Link to home
Start Free TrialLog in
Avatar of beefnorthwest
beefnorthwest

asked on

chmod for multiple users

I am running a script (capistrano if that matters) that connects via ssh to another server, does some file transfers then tries to set permissions with chmod.  it works fine for me since I was the only one working on them and I was the owner.  I need to be able to do this now with 2 users, but we get operation not permitted when the other user tries to run it.  

I am sure this is a simple solution, but I don't know how to fix it.  I tried setting the group to admin (since we are both in the admin group), but that didn't work.

let me know if I am leaving anything out.
ASKER CERTIFIED SOLUTION
Avatar of mccracky
mccracky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Because of the ownership and the current permissions, you may have to do a chown before you do the chmod.  

Or you can change the way the files are transferred so that they transfer with the correct ownership before you do the chmod.  

If you do a chmod on files you don't own, the permissions already have to be somewhat permissive or you have to be root.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of T1750
T1750

The command to change umask is umode.
Actually that's complete rubbish, ignore my last comment.