Sponsored Content
Top Forums Programming chmod:No such file or directory Post 302347069 by Smiling Dragon on Monday 24th of August 2009 08:35:19 PM
Old 08-24-2009
You are unlinking the file just a few lines above, I wouldn't be surprised that it's not there when you try and chmod it...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

directory permissions and CHMOD

I am working on a new UNIX box that has been delivered to us, and noticed that the /home directory has 555 permissions on it (dr-xr-xr-x). Any attempt to create write permissions fails on this directory (such as chmod 777), responding only with a message; chmod: WARNING: can't change home ... (3 Replies)
Discussion started by: ncarmstrong
3 Replies

2. UNIX for Dummies Questions & Answers

what to chmod to write in a directory?

i am unable to write to some .php files in the following directory: drwxr-xr-x 3 headroom max 448 Jun 6 2004 Docs i already tried this: chmod +777 Docs chmod: changing permissions of `Docs': Operation not permitted thanks for your help! (2 Replies)
Discussion started by: phonedog365
2 Replies

3. UNIX for Dummies Questions & Answers

chmod erased a directory(?)

I was attempting to change permissions on a directory, used a 'chmod -rwrwrw DirectoryName' command, and hit enter. Now, that directory shows that it's empty! How could this be? Any Ideas? Thanks (1 Reply)
Discussion started by: SmooBG
1 Replies

4. Shell Programming and Scripting

use a file to chmod

Hi! I need help becouse I've server to backup and I've a lot of files with 700 permission and I need to change the mode to 755 before copy So the point is. With find . -perm 700 -exec echo {} > textfile.txt \; I got a text file with 3156 line which one... (3 Replies)
Discussion started by: ruben.rodrigues
3 Replies

5. Solaris

Unable to chmod a file/directory

This is Solaris 10, by the way. I am aware of ACLs or something like that in Solaris 10 where you can change who can access directories and such that goes beyond the standard permisisons (chmod and rwxrwxrwx). Although I thought when these were being used, the permissions listing would show a... (12 Replies)
Discussion started by: lyonsd
12 Replies

6. UNIX for Dummies Questions & Answers

chmod of remote file

I would like to chmod the file which I am pulling from remote server onto my server. I am using the following script: sftp <server detail> get abc xyz chmod 666 xyz bye Though I could fetch the file successfully but I am not able to change the permission of xyz file on my server. umask... (1 Reply)
Discussion started by: kdtrica
1 Replies

7. Shell Programming and Scripting

File permission by chmod

Hi, I have a typical problem. Consider the scenario: Folder1 ------> Folder2 ------> File1 ------> Folder3 Above is my folder structure, currently the user group "other" has no permissions. I wish to give "read" permission for "others" to File1 using a single command. chmod -R... (5 Replies)
Discussion started by: animesh303
5 Replies

8. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

9. Red Hat

chmod only immediate directory?

I am having trouble figuring out how to do a "chmod o-w" for all files under a certain directory, while excluding directories under that certain directory. I can do chmod -R o-w /thisdirectory but that changes permissions of all directories under the directory as well as files. I just... (2 Replies)
Discussion started by: austinharris43
2 Replies

10. Shell Programming and Scripting

excluding a directory with chown, chmod

does anyone know how to exclude a directory with chown or chmod? im trying to do something like this chown $username:$username $directory/* chown $username:$username $directory/.* chown $username:$username $directory and find $directory/* -type f -exec... (1 Reply)
Discussion started by: vanessafan99
1 Replies
UNLINK(2)						     Linux Programmer's Manual							 UNLINK(2)

NAME
unlink - delete a name and possibly the file it refers to SYNOPSIS
#include <unistd.h> int unlink(const char *pathname); DESCRIPTION
unlink() deletes a name from the file system. If that name was the last link to a file and no processes have the file open the file is deleted and the space it was using is made available for reuse. If the name was the last link to a file but any processes still have the file open the file will remain in existence until the last file descriptor referring to it is closed. If the name referred to a symbolic link the link is removed. If the name referred to a socket, fifo or device the name for it is removed but processes which have the object open may continue to use it. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
EACCES Write access to the directory containing pathname is not allowed for the process's effective UID, or one of the directories in path- name did not allow search permission. (See also path_resolution(7).) EBUSY The file pathname cannot be unlinked because it is being used by the system or another process; for example, it is a mount point or the NFS client software created it to represent an active but otherwise nameless inode ("NFS silly renamed"). EFAULT pathname points outside your accessible address space. EIO An I/O error occurred. EISDIR pathname refers to a directory. (This is the non-POSIX value returned by Linux since 2.1.132.) ELOOP Too many symbolic links were encountered in translating pathname. ENAMETOOLONG pathname was too long. ENOENT A component in pathname does not exist or is a dangling symbolic link, or pathname is empty. ENOMEM Insufficient kernel memory was available. ENOTDIR A component used as a directory in pathname is not, in fact, a directory. EPERM The system does not allow unlinking of directories, or unlinking of directories requires privileges that the calling process doesn't have. (This is the POSIX prescribed error return; as noted above, Linux returns EISDIR for this case.) EPERM (Linux only) The file system does not allow unlinking of files. EPERM or EACCES The directory containing pathname has the sticky bit (S_ISVTX) set and the process's effective UID is neither the UID of the file to be deleted nor that of the directory containing it, and the process is not privileged (Linux: does not have the CAP_FOWNER capabil- ity). EROFS pathname refers to a file on a read-only file system. CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001. BUGS
Infelicities in the protocol underlying NFS can cause the unexpected disappearance of files which are still being used. SEE ALSO
rm(1), chmod(2), link(2), mknod(2), open(2), rename(2), rmdir(2), unlinkat(2), mkfifo(3), remove(3), path_resolution(7), symlink(7) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2011-09-15 UNLINK(2)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy