0

Right now, there is a mounted NFS storage on RHEL server at the following location:

mnt/NFS/Data

So I had to request read, write, delete permissions inside Data directory from the server admin.

After getting the permissions, I created three folders viz dev, prod and test inside the Data folder.

So I am the owner of dev, prod and test folders. The way I would like to modify the permissions is as follows:

Scenario 1) No one inside prod and test folders should be able to delete a file and folder including me.

Scenario 2) Everyone should be able to delete files and folders inside the dev directory.

Questions:

  1. For scenario 1, I think I should be able to change the permission for others to read and write inside the prod and test folder since I'm the owner. But what about me? Do I need to ask the server admin to take control of permission so that everyone inside prod and test folders should have the same permissions including me?

  2. Should I consider asking server admin to take the ownership from my username to root and take control of the directory dev and then assign everyone read, write and delete permissions?

1 Answer 1

0

You can take away write permissions from a file owner, which is sufficient if it's just to prevent you from accidentally overwriting a file. However, a file owner can still grant themselves write access, so it's not useful as a security measure.

You don't need the dev folder to be owner by root to give everyone else read/write permissions.

Also keep in mind that the ability to delete a file is determined by the write permission on the folder, not the file itself.

1
  • Thanks for your answer. So for scenario #1, would you suggest me to ask the server admin to take control of permission so that everyone inside prod and test folders should have the same permissions including me. I don't want to be the only one who could accidently delete a file. So the above approach of asking server admin sounds good?
    – Tan
    Commented Jul 20, 2020 at 21:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .