Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm Using AIX.

I have a folder owned by me. Permissions for the folder are 777.

That means anyone can keep their files in this folder.

But I want the files to be kept only with 777 permissions. But people are keeping files with lesser permissions making it unreadable for others.

Is there any way of making all file inside folder with 777 permission automatically?

share|improve this question

1 Answer 1

You can't set umask values for specific folders. You could set it system-wide by adding a umask command to /etc/profile or /etc/bash.bashrc but that is not a good idea if you want to set permissions to 777.

If the folder in question is a separate, mounted filesystem, you might be able set a umask for it in the /etc/fstab. This depends on the filesystem used though, according to man mount the umask (or equivalent) option is available for FAT, hfs, hpfs, ntfs and udf.

In all other cases, your best bet would be to set up a cron job that recursively changes the folder's permissions to 777. Add this line to /etc/crontab:

* * * * * root chmod -R 777 /path/to/dir
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.