Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

group permissions questions

Status
Not open for further replies.

capitano

Programmer
Jul 30, 2001
88
0
0
US
I have a "webuser" through which web visitors can upload image files to a directory on the web server.

Unfortunately, when the images get uploaded, they don't get put down with public read permissions.

I tried making my ColdFusion web script execute a "chmod 775" on the images folder, but since the ColdFusion server is running as "webuser" and this folder is owned by "somebodyelse", then I don't have the right permissions to do chmod. Fortunately, both the folder owner and the "webuser" are in the same group however. So I think I must be close to getting this working.

Any suggestions?
Thanks so much.

Bryan
 
Okay, that was a little scattered because I was frusterated. Let me rephrase:

I have two users, call them "bob" and "sally".
I have a common group to which they both belong, called "friends".

In /home/sally there is a directory called "shared" with following permissions:

drwxrwxr-x sally friends 4096 Jan 22 12:08 shared

I want bob to be able to go into /home/sally/shared and create new files. Okay, no problem. Bob can do that because this "shared" directory is open to "friends" group.

My question is this: I want bob to be able to chmod 775 on everything in /home/sally/shared. But I'm getting permission problems.

How can I get bob permissions to do chmod in such a shared folder?

Thanks for any help.
 
You might try setting the gid bit for that directory so all files in it will inherit the group. To do this you would chmod the directory to 2775.
 
You could also set the umask for the users so that any files they copy/create gets a specific set of permissions.

adding something like: umask 002 to each users' .bashrc file should have the desired effect.

umask works on the same basis as chmod, only it dictates the permissions when a file gets created, and where 777 with chmod would give full permission, a umask of 000 will do the same.

-Hannes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top