You are not logged in.
I'm sure this is an easy answer but I've had trouble googling it up.
Specifically to my situation, I want to be able to edit things with 755 permissions that are owned http:http
without having to use sudo since that can end up with root owning anything I create, and sometimes I forget to set the permissions back.
Offline
I'm sure this is an easy answer but I've had trouble googling it up.
Specifically to my situation, I want to be able to edit things with 755 permissions that are owned http:http
without having to use sudo since that can end up with root owning anything I create, and sometimes I forget to set the permissions back.
This defeats the purpose of having permissions in the first place.
If you can su to the http user (I doubt it) that will work, otherwise, no.
![]()
Offline
You can use sudo to run the text editor as another user:
sudo -u username -e fileOr set up some advanced permissions with ACLs or bindfs.
don't drink unwashed fruit juice.
i never make predictions, especially about the future.
Offline
If none of the above works you could try setting the files and folders in question to be writeable by the group and add your user to the http group? I am not sure this is a good idea though.
Offline
you can always create a samba mount, and set it up so that all files edited in the samba share are owned by httpd, and THEN mount that locally somewhere the user doing the editing can access.
thats how i handle it in my home network
Offline
Have your editor setuid and owned by http? Well this ends up in a way such that everyone
can edit files owned by user http.
Last edited by eirika (2010-06-10 22:13:30)
Offline
I'm not sure I understand where this "defeats the purpose" entirely. Yeah I'm guessing su isn't going to work because http doesn't have a shell to use.
I think I will look at bindfs and ACL.
But consider this scenario, two people want to be able to work in the same directory, but nobody else. However, group 'foo' has to be able to read everything in it, but nobody else. How do you manage those permissions?
Offline
But consider this scenario, two people want to be able to work in the same directory, but nobody else. However, group 'foo' has to be able to read everything in it, but nobody else. How do you manage those permissions?
Considering that the group `foo' is also allowed to write to the files and that `other' should have no access, this is an option
sudo groupadd foo
sudo usermod -aG foo user1
sudo usermod -aG foo user2
#relogin both users
sudo mkdir /tmp/foodir
sudo chown foo.foo /tmp/foodir
sudo chmod 770 /tmp/foodir
#set the SGID so files created in dir keep `foo' group
sudo chmod g+s /tmp/foodirLast edited by alterecco (2010-06-12 03:59:31)
Offline
But consider this scenario, two people want to be able to work in the same directory, but nobody else. However, group 'foo' has to be able to read everything in it, but nobody else. How do you manage those permissions?
HowTo: Create a shared directory for local users (with bindfs).
OR
don't drink unwashed fruit juice.
i never make predictions, especially about the future.
Offline