Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi! I currently have a question regarding folder security. I have a Linux box at work and created two user accounts for two specific portions of the company. One for the marketing department and sales department. I created two users called markdept and salesdept. Inside those to users I have added to folders each user called posted_work and work_completed.
For example : /home/markdept/posted_work
/home/markdept/work_completed
Then I added members to each group and chmodded
both the markdept and salesdept home folders with 770 which only allows the owner and group members to see the /home/posted_work
chmod 770 /home/markdept
The current situation is that even though I chmod the folder called posted_work with 750 which is only d-rwxr-x--- and assign an owner with
chown -R user1:markdept /home/markdept/posted_work people in the markdept group can still delete the folder called /home/markdept/posted_work. I have done an ls -l on the folders and see that owner has full privileges, groups have only read and execute, and zero permissions to others. However how can members of the group still delte the folder using the rm -rf command.
Sorry for the long post I am just stuck and need to find a resolution fast for security purposes.
This is the correct behaviour - the markdept group has rwx permission on /home/markdept/. This means that they can delete anything in /home/markdept, including any subdirectories. However if you put a file in posted_work that the markdept group doesn't have permission to delete you'll have effectively stopped them from being able to delete posted_work.
Hi! Thanks for the reply I was going nuts trying to figure out why I was able to delete a folder when I was not granting the permission so I just added a file that belonged specifically to root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.