Trouble setting up User Private Group(UPG) in RHEL5
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Lets say that I have a folder called "html", a group called "coders", and 2 users named "user1" and "user2." Heres what I did.
I setup the coders group, and added user1 and user2 to that group. When I check the group file I see the following for coders group,
Next I changed all files and folders under the html folder to have the owner of root, the group of coders, and the permissions with the GID sticky bit set,
<chown -R root.coders html>
<chmod -R 2775 html>
Now, if I open up an FTP program like winscp and create a file under the html folder with user1, the permissions on the file are this,
<-rw-rw-r-- 1 user1 coders 5 Jun 24 15:45 test.php>
The sticky bit is gone, and user2 cannot overwrite this file or delete it. I want to set it up so that every user in the "coders" group will have full permissions to all folders and files under the "html" folder. What am I doing wrong? Thanks in advance for any help.
So are you saying that I need to install ACL in order to fix this problem? Or is there another way? I dont really know alot about the different linux file systems and I dont know anything about this ACL either.
I'm saying that UPG, novel as it may have been at the time, has its uses. Given how managing groups can get unwieldy I suggested ACLs as that's what most of these types of questions (should) end up with. That you know nothing of "different linux file systems" or ACL can be easily repaired by reading the documentation and examples there and search LQ for threads on ACL. I hope you will conclude it is versatile and easy to set up, use and manage.
Ok I think I have figured out my problem. Since im not "spectacular" with linux, I did not really know what ACL is, and I did not know that it is already built into the system. Now that I have figured that out I should be able to find the answers I needed. Thanks again for all your help unSpawn. I will post again later if I still have more questions.
Im using ACL now and im running into the same problems. It seems like no matter what permissions I put on a file or folder for the group, it only allows me to alter the file if it is the owner altering it.
Heres what im doing. I put a default ACL on the html folder like this,
It seems as though it is uploading fine in filezilla. So maybe the problem is WinSCP.....I just did not think that there would be any difference between the two. Here is the error that WinSCP gives me.
Actually, I now realized that WinSCP is actually uploading it fine....Im just getting an error about the permissions, and im having to hit the abort key. Strange.....Maybe FileZilla just knows that this does not matter because it knows the permissions are correct due to the ACL.