LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Forcing permissions (https://www.linuxquestions.org/questions/linux-general-1/forcing-permissions-295373/)

tsphan 02-27-2005 01:08 AM

Forcing permissions
 
i have a directory in my root called "/public", i made it so i could make a place where all users had access to. It's pretty nice since i can have everyone use the same wine settings. The problem is that when i put something in there, i have to go to it and change the permissions to either 666 or 777. Is there anyway I can make it so that everything in the /public folder will be 666 or 777?

fsbooks 02-27-2005 01:22 AM

It is a bit of a hack, but you put a file in /etc/cron.hourly with the following line:

chmod -R a+rw /public

This will fix up the files once an hour. You could do this more frequently with a specific crontab entry. More sophiticatedly, you could use a find (again in script or cron) to discover the files with "incorrect" permissions, and just fix those. This would avoid reseting the ctime for all the files whenever the script was run.

tsphan 02-27-2005 04:10 PM

i don't put files in it too often, so i didn't think i'd setup a crontab, thanks anyways though


All times are GMT -5. The time now is 04:46 PM.