Unix/Linux Go Back    

Unix Version 7 - man page for access (v7 section 2)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

ACCESS(2)										ACCESS(2)

       access - determine accessibility of file

       access(name, mode)
       char *name;

       Access  checks the given file name for accessibility according to mode, which is 4 (read),
       2 (write) or 1 (execute) or a combination thereof.  Specifying mode 0  tests  whether  the
       directories leading to the file can be searched and the file exists.

       An  appropriate	error  indication  is  returned  if name cannot be found or if any of the
       desired access modes would not be granted.  On disallowed accesses -1 is returned and  the
       error code is in errno.	0 is returned from successful tests.

       The  user  and  group IDs with respect to which permission is checked are the real UID and
       GID of the process, so this call is useful to set-UID programs.

       Notice that it is only access bits that are checked.  A	directory  may	be  announced  as
       writable by access, but an attempt to open it for writing will fail (although files may be
       created there); a file may look executable, but exec will fail unless it is in proper for-


       (access = 33.)
       sys access; name; mode

Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 04:00 PM.