I ran truss on a running java program, and noticed that the access system call was returning "Err#2 ENOENT" for existing files, files that were succesfully "accessed" earlier in the same program, and later on.
Is there any reasonable explanation for this behaviour?
In the truss output I find: (preceded by line-numbers)
The files are located on:
/dev/lv_soft_IH /softih jfs2 Aug 06 06:37 rw,log=INLINE
I want to look into a folder to see if there are any folders within it. If there are, I need to check inside each folder to see if it contains a .pdf file
So
If /myserver/myfolder/
contains a folder AND that folder conatins a .pdf file
do X
Else
do Z
I may have multiple folders and... (4 Replies)
How in AIX 5.1 can I access a windows shared drive without using NFS. I have looked into cifs but I can not seem to find the package that I need to install for AIX 5.1 if anyone can give me any further direction please let me know. (2 Replies)
Hi all,
I have a project on going that combines two different departments. I cannot give detais on this project, I´m sure everybody understands that, but I would like your help on giving me pointers on how to give an existing user access to ftp, without the need to give him full access. So here... (0 Replies)
/************************************************************************
*
* TEST NAME: setrlimitd_su.c
*
* PURPOSE: To verify the soft (rlim_cur) and hard (rlim_max) limit
* of process RLIMIT_DATA resources correctly inherited by
* the exec() system call.
*
* RESULT: function call should... (1 Reply)
Are there any special requirements/tools needed for a AIX server to see (copy data) a Windows share? Only need 1-way copy (Windows-to-AIX). (8 Replies)
Hi All,
Its regarding the LDAP in AIX.
we already have Microsoft Active Directory (LDAP) Server. And would like to integrate My client AIX LPAR to this LDAP server. So' that we can directly use Active directory crdentials to login. (instead of creating USERs on AIX)
from my AIX LPAR.
... (4 Replies)
Hello,
I'd like to start my question with, is it possible to display the CDE of an AIX device with remote connection from Windows 7?
We normally use the Exceed application for this, though I need to connect to the device with VPN connection. With Exceed it goes through TCP, with VPN its UDP,... (2 Replies)
I am running AIX 7.1 and currently we have samba 3.6.25 installed on the server. As it stands some AIX folders are shared that can be accessed by certain Windows users.
The problem is that since Windows 10 the guest feature no longer works so users have to manually type in their Windows login/pwd... (14 Replies)
Discussion started by: linuxsnake
14 Replies
LEARN ABOUT SUNOS
access
access(2) System Calls access(2)NAME
access - determine accessibility of a file
SYNOPSIS
#include <unistd.h>
int access(const char *path, int amode);
DESCRIPTION
The access() function checks the file named by the pathname pointed to by the path argument for accessibility according to the bit pattern
contained in amode, using the real user ID in place of the effective user ID and the real group ID in place of the effective group ID. This
allows a setuid process to verify that the user running it would have had permission to access this file.
The value of amode is either the bitwise inclusive OR of the access permissions to be checked (R_OK, W_OK, X_OK) or the existence test,
F_OK.
These constants are defined in <unistd.h> as follows:
R_OK Test for read permission.
W_OK Test for write permission.
X_OK Test for execute or search permission.
F_OK Check existence of file
See intro(2) for additional information about "File Access Permission".
If any access permissions are to be checked, each will be checked individually, as described in intro(2). If the process has appropriate
privileges, an implementation may indicate success for X_OK even if none of the execute file permission bits are set.
RETURN VALUES
If the requested access is permitted, access() succeeds and returns 0. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The access() function will fail if:
EACCES Permission bits of the file mode do not permit the requested access, or search permission is denied on a component
of the path prefix.
EFAULT path points to an illegal address.
EINTR A signal was caught during the access() function.
ELOOP Too many symbolic links were encountered in resolving path.
ELOOP A loop exists in symbolic links encountered during resolution of the path argument.
ENAMETOOLONG The length of the path argument exceeds {PATH_MAX}, or a pathname component is longer than {NAME_MAX} while
_POSIX_NO_TRUNC is in effect.
ENOENT A component of path does not name an existing file or path is an empty string.
ENOLINK path points to a remote machine and the link to that machine is no longer active.
ENOTDIR A component of the path prefix is not a directory.
EROFS Write access is requested for a file on a read-only file system.
The access() function may fail if:
EINVAL The value of the amode argument is invalid.
ENAMETOOLONG Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
ETXTBSY Write access is requested for a pure procedure (shared text) file that is being executed.
USAGE
Additional values of amode other than the set defined in the description might be valid, for example, if a system has extended access con-
trols.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO intro(2), chmod(2), stat(2), attributes(5), standards(5)SunOS 5.10 23 Apr 2002 access(2)