I have a network mount on a qnap server mounted to Ubuntu clients using a single user id for all computers. They are mounted like this:
// /mnt/myshare cifs nofail,uid=1000,gid=100,dir_mode=0775,file_mode=0775,rw,iocharset=utf8,credentials=<credential_file>

I want to have a directory that does not have write access by default, so users must explicitly state that they want to modify it.

I have tried doing chmod a-wx -R foldername, this changes the permissions for files, making them read only, but directories remain writable by some programs. I can't do touch filename, but I can do tar -xzf myfile.tar.gz.

How can I avoid accidental user modification of files in a specific folder in a network mount?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.