1

My usecase is that there is a user who doesn't have the write access to a directory. However, I wanna make him be able to edit one file inside that directory. If he is only granted the write access to that particular file, but not to the whole directory, can he write to the file? Thanks

1
  • 1
    Yes, but a better idea might be to place that file in a different directory where this user can do no harm, e.g. /tmp; and create a symbolic link ( ln -s [target] [link name]) from the original location to the new file.
    – Jos
    Commented Nov 13, 2020 at 16:15

1 Answer 1

1

No problem, with ls -l you can check different users permission, you can run chmod 777 your-file.txt to give permission for everything to everyone and it doesn't matter if the user doesn't have the write permission to the directory which contains the file you just gave the write permission.

You must log in to answer this question.

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