0

I created a folder in a server and wanted to share it with all users so that when they uploads files, the permission would be 777 as default. Currently only those files that I upload myself will be 777 but not when another user does such.

How do I do this?

After creating a folder, in the Properties, I checked RWX for Owner, Group, and Others and checked "... permission recursively". But when a colleague of mine creates a file in my folder, it shows as read-only.

1 Answer 1

0

You would need to run some sort of periodic script to change the permissions of the files, probably as root.

On a Unix system, when you create a file, it's created with permissions based on the umask of the user. For example, if the file is not created with any explicit permissions and the umask is 027, then the permissions will be 0777 & ~0027 == 0750. The only way to have all files created as 777 would be for the creating user to have their umask set to 000 when creating the file, which would be a wildly insecure setting.

What may be useful, however, if you're working on a Linux server, is to set the setgid bit on the directory: chmod g+s DIRNAME. That will force the group owning the directory to also be the group for the files, which may let you have permissions that you might not otherwise have. However, whether the owner chooses to have their umask set sufficiently that other users have the access you desire is still up to the owner.

You must log in to answer this question.

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