> Hi all for your answers, > > I´m going to tell you why I´m trying to do that. it´s more complicated that > the use of chmod, but it is the begining ot the problem, > > I have a webserver with the user apache being the owner of all under /opt/www/. > > Well, this user hasn´t a shell (it´s is /sbin/nologin) so I can´t connect > with this user. > So I use another user that makes the upgrades of my application and web pages, (I use rsync to make this upgrades). The problem is that with this > user I can´t change the permission to the files. > > One more thing, when I update one file, it changes the owner and group of > the file to the user that I use to connect. > > I use this: > rsync -azv -e 'ssh ' --delete /locatpatch/* user2@server:/opt/www/ > > perhaps it´s a problem with what I want to do (I know, that I can dive shell > access to the apache user and do all with it, but I prefer not to grant that > permissions to this user) > > any idea? Sure..."sudo su apache -c "chmod 770 /path/to/file" Leaving the "-" absent from between "su" and "apache" will cause it to not try to invoke a shell, but use your shell, instead. > 2010/1/14 <m.roth@xxxxxxxxx> > >> > Hi all, >> > >> > I have a problem changing permissions to some files using chmod and >> now I >> > have a doubt about the owner and group of a file, >> > >> > I´ll try to explain. >> > >> > I have 2 users, user1 and user2, both belongs to group1. >> > >> > I have a file with this permissions: >> > -rwxrwxrwx 1 user1 group1 file.txt >> > >> > with user2 I can read, write this file. but If I try to change the permissions with this: >> > chmod 770 file.txt I get the error: >> > operation not permitted, >> > >> > so my doubt is, only the owner can change the permissions to a file? >> Think about the *meaning* of what you tried to do: you, as a member of the >> group, but not as the owner, are trying to make it so that the owner cannot even look at the file, not execute, not write, not even read. Does >> that make sense? >> mark >> -- >> redhat-list mailing list >> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list > -- > redhat-list mailing list > unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list > -- Mike Burger http://www.bubbanfriends.org Visit the Dog Pound II BBS telnet://dogpound2.citadel.org or http://dogpound2.citadel.org To be notified of updates to the web site, visit: https://www.bubbanfriends.org/mailman/listinfo/site-update or send a blank email message to: site-update-subscribe@xxxxxxxxxxxxxxxxx -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list