06-01-2009
cant able to change permission in a DIR as root user
Hi
my directory not accepting any commands. its simply telling permission denied. i tried ( cp, mv, rm ) as roor
i want to set default permissons to this DIR
please find the Logs below.
dr-xr-xr-x 1 root root 1 Jun 1 09:04 AP1_ROP ( original dir)
root> chmod 777 valve
chmod: WARNING: can't change valve
root> getfacl AP2_ROP
# file: AP2_ROP
# owner: bin
# group: bin
user::rwx
group::r-x #effective:r-x
mask:r-x
other:r-x
please give me a solution,
i tried all commands with root login, something went wrong with the directory, its not accepting any commands.
Thanks
Vijay,
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Folks;
I'm a root but i couldn't change /home directory permission or group. i'm getting operation not permitted.
Any help? (6 Replies)
Discussion started by: moe2266
6 Replies
2. Solaris
I am using oracle 9i with sun solaris 8 on Sun E 250 server.earlier we are taking backup of oracle archive files on /orabackup directory.in which archive file are stored with ...arc.Z extension. now we have changed the archive backup directory.now when we are trying to delete earlier directory... (3 Replies)
Discussion started by: mahanalok
3 Replies
3. Solaris
Hi All
While configuring zone I run
add inherit-pkg-dir
I thing this command will inherit opt,etc,lib... directories from global zone to non global zone with read permission................
So this makes problem for me I want to edit one file opt dir which is useful for my project but when I... (4 Replies)
Discussion started by: vijaysachin
4 Replies
4. HP-UX
Hi
i am new to this admin area .
i have created user with name as "ab" and gave home dir as /home/ab .
when i tried to create the /home/ab dir , i got he following error.
"mkdir: Failed to make directory "/home/ab"; Operation not applicable
"
Thanks in advance . (1 Reply)
Discussion started by: expert
1 Replies
5. UNIX for Dummies Questions & Answers
I've been through many threads before i decide to create a separate thread.
I can't really find the solution to my (simple) problem.
Here's what I'm trying to achieve:
As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user.
The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies
6. Solaris
hi guys..
how to give root permission for particular user
tel me step by step (2 Replies)
Discussion started by: coolboys
2 Replies
7. UNIX for Advanced & Expert Users
In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Discussion started by: waavman
14 Replies
8. HP-UX
Hi All
I had installed sudo in HP UX 11.3 and it is working fine but not able to make entry required to set permission similar to ROOT without using password (PASSWD) change option for define user in /etc/sudoers file
Please help if some know the syntex? :confused::wall: (2 Replies)
Discussion started by: deviltech
2 Replies
9. UNIX for Dummies Questions & Answers
Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user.
How to fix this? (1 Reply)
Discussion started by: syncmaster
1 Replies
10. AIX
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies
LEARN ABOUT ULTRIX
telldir
directory(3) Library Functions Manual directory(3)
Name
opendir, readdir, telldir, seekdir, rewinddir, closedir - directory operations
Syntax
#include <sys/types.h>
#include <sys/dir.h>
DIR *opendir(dirname)
char *dirname;
struct direct *readdir(dirp)
DIR *dirp;
long telldir(dirp)
DIR *dirp;
void seekdir(dirp, loc)
DIR *dirp;
long loc;
void rewinddir(dirp)
DIR *dirp;
int closedir(dirp)
DIR *dirp;
Description
The library routine opens the directory named by filename and associates a directory stream with it. A pointer is returned to identify the
directory stream in subsequent operations. The pointer NULL is returned if the specified filename can not be accessed, or if insufficient
memory is available to open the directory file.
The routine returns a pointer to the next directory entry. It returns NULL upon reaching the end of the directory or on detecting an
invalid operation. The routine uses the system call to read directories. Since the routine returns NULL upon reaching the end of the
directory or on detecting an error, an application which wishes to detect the difference must set errno to 0 prior to calling
The routine returns the current location associated with the named directory stream. Values returned by are good only for the lifetime of
the DIR pointer from which they are derived. If the directory is closed and then reopened, the value may be invalidated due to undetected
directory compaction.
The routine sets the position of the next operation on the directory stream. Only values returned by should be used with
The routine resets the position of the named directory stream to the beginning of the directory.
The routine closes the named directory stream and returns a value of 0 if successful. Otherwise, a value of -1 is returned and errno is set
to indicate the error. All resources associated with this directory stream are released.
Examples
The following sample code searches a directory for the entry name.
len = strlen(name);
dirp = opendir(".");
for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
if (dp->d_namlen == len && !strcmp(dp->d_name, name)) {
closedir(dirp);
return FOUND;
}
closedir(dirp);
return NOT_FOUND;
Environment
In the POSIX environment, the file descriptor returned in the DIR structure after an call will have the FD_CLOEXEC flag set. See <fcntl.h>
for more detail.
Return Values
Upon successful completion, returns a pointer to an object of type DIR. Otherwise, a value of NULL is returned and errno is set to indi-
cate the error.
The routine returns a pointer to an object of type struct dirent upon successful completion. Otherwise, a value of NULL is returned and
errno is set to indicate the error. When the end of the directory is encountered, a value of NULL is returned and errno is not changed.
The routine returns the current location. No errors are defined for and
The routine returns zero upon successful completion. Otherwise, a value of -1 is returned and errno is set to indicate the error.
Diagnostics
The routine will fail if:
[EBADF] The dirp argument does not refer to an open directory stream.
[EINTR] The routine was interrupted by a signal.
The routine will fail if:
[EACCES] Search permission is denied for any component of dirname or read permission is denied for dirname.
[ENAMETOOLONG] The length of the dirname string exceeds {PATH_MAX}, or a pathname component is longer than {NAME_MAX}.
[ENOENT] The dirname argument points to the name of a file which does not exist, or to an empty string and the environment defined is
POSIX or SYSTEM_FIVE.
[ENOTDIR] A component of dirname is not a directory.
[EMFILE] Too many file descriptors are currently open for the process.
[ENFILE] Too many files are currently open in the system.
The routine will fail if:
[EBADF] The dirp argument does not refer to an open directory stream.
See Also
close(2), getdirentries(2), lseek(2), open(2), read(2), dir(5)
directory(3)