Sponsored Content
Top Forums UNIX for Dummies Questions & Answers what to chmod to write in a directory? Post 73273 by phonedog365 on Monday 30th of May 2005 04:23:23 PM
Old 05-30-2005
yeah, the chmod 777 didn't work. i had to have the owner chown it for me. thanks for your help!
 

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

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

3. Shell Programming and Scripting

How to write logs to a specified Directory??

I have the following script which writes the output of the scirpt in a log file in the same directory from which the script is run. I need the scipt to write the logs daily to a differnt directory with the date appended to the log on a daily basis. The script is as follows... .... (1 Reply)
Discussion started by: nirmal84
1 Replies

4. UNIX for Dummies Questions & Answers

write a directory location

Hi, Just want to be sure that if I write a directory like: /documents/script.pl is the same as to write: /documents//script.pl Thanks in advance (1 Reply)
Discussion started by: fadista
1 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 Advanced & Expert Users

Possible to show in which directory a user can write?

Hi Gurus, is there a possibility to show where a user can write to? i want to see all directories where a user has permissions to write to. Kind Regards FranzB (0 Replies)
Discussion started by: FranzB
0 Replies

7. Programming

chmod:No such file or directory

sprintf(fname, "core.%d", pid); (void) unlink(fname); if (ttrace(TT_PROC_CORE, pid, 0, 0, 0, 0) != 0) { perror("TT_PROC_CORE pass"); Fail(); } if (chmod(fname, 0) != 0) { perror("chmod"); Fail(); } Hi, If i execute above code,everytime am getting below... (1 Reply)
Discussion started by: mansa
1 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
chown(2)							System Calls Manual							  chown(2)

NAME
chown, lchown, fchown - Changes the owner and group IDs of a file SYNOPSIS
#include <unistd.h> int chown( const char *path, uid_t owner, gid_t group ); int lchown( const char *path, uid_t owner, gid_t group ); int fchown( int filedes, uid_t owner, gid_t group ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: chown(): POSIX.1, XPG4, XPG4-UNIX fchown(): POSIX.1, XPG4-UNIX lchown(): POSIX.1, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the name of the file whose owner ID, group ID, or both are to be changed. When the path parameter refers to a symbolic link, the behaviors of the chown() and the lchown() functions differ. The chown() function changes the ownership of the file pointed to by the sym- bolic link. The lchown() function changes the ownership of the symbolic link file itself. Specifies a valid open file descriptor. Speci- fies a numeric value representing the owner ID. Specifies a numeric value representing the group ID. DESCRIPTION
The chown(), lchown() and fchown() functions change the owner and group of a file. A process can change the value of the owner ID of a file only if the process has superuser privilege. A process can change the value of the file group ID if the effective user ID of the process matches the owner ID of the file, or if the process has superuser privilege. A process without superuser privilege can change the group ID of a file only to the value of its effective group ID or to a value in its sup- plementary group list. If the value of the owner ID is changed and the process does not have superuser privilege, the set-user ID attribute (the S_ISUID bit) of a regular file is cleared. The set-user ID attribute (S_ISUID bit) of a file is cleared upon successful return if: The file is a regular file. The process does not have superuser privilege. The set-group ID attribute (S_ISGID bit) of a file is cleared upon successful return if: The file is a regular file. The process does not have superuser privilege. If the owner or group parameter is specified as (uid_t)-1 or (gid_t)-1 respectively, the corresponding ID of the file is unchanged. Upon successful completion, the chown(), lchown(), and fchown() functions mark the st_ctime field of the file for update. RETURN VALUES
Upon successful completion, the chown(), lchown(), and fchown() functions return a value of 0 (zero). Otherwise, a value of -1 is returned, the owner and group of the file remain unchanged, and errno is set to indicate the error. ERRORS
If the chown() and lchown() functions fail, errno may be set to one of the following values: Search permission is denied on a component of path. The path parameter is an invalid address. The owner or group ID is not a value supported by this implementation. Too many links were encountered in translating path. The length of the path argument exceeds PATH_MAX or a pathname component is longer than NAME_MAX. The path parameter does not exist or is an empty string. A component of path is not a directory. The effective user ID does not match the ID of the owner of the file, and the calling process does not have appropriate privilege and _POSIX_CHOWN_RESTRICTED indicates that such privilege is required. The named file resides on a read-only file system. The process' root or current directory is located in a virtual file system that has been unmounted. If the fchown() function fails, errno may be set to one of the following values: The file descriptor filedes is not valid. The owner or group ID is not a value supported by this implementation. RELATED INFORMATION
Functions: chmod(2) Commands: chown(1) Standards: standards(5) delim off chown(2)
All times are GMT -4. The time now is 09:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy