Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't understand this at all. I keep setting permissions for a directory called /home/ftp to 777 so that any user can upload files to this directory. For whatever reason, at some point the permissions go back to 766, meaning that nobody can upload anything besides the directory owner. For instance, I changed the permission to 777 before I went to bed last night, woke up and it was back to 766. It's getting very frustrating, as everyone tells me that permission changes should be permanent. Is there anyway to make sure that the permission doesn't change back, or a way to log when it's changing? Or any ideas as to what's causing this?
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
Re: Permissions keep resetting for directory
Quote:
Originally posted by HiRoll3r I don't understand this at all. I keep setting permissions for a directory called /home/ftp to 777 so that any user can upload files to this directory. For whatever reason, at some point the permissions go back to 766, meaning that nobody can upload anything besides the directory owner. For instance, I changed the permission to 777 before I went to bed last night, woke up and it was back to 766. It's getting very frustrating, as everyone tells me that permission changes should be permanent. Is there anyway to make sure that the permission doesn't change back, or a way to log when it's changing? Or any ideas as to what's causing this?
BTW, I use Mandrake 9.0, if that matters.
A visit from the security fairy perhaps?
Anyway, I wouldn't think that those permissions would keep users from uploading a file. Now they might not be able to list the directory contents (which is sometimes what you want). Could there be some cron job that's doing this? Does Mandrake have the cron.hourly, .daily, .weekly, .monthly cron subdirectories under /etc like Red Hat does? I'd look in there and see if there's some scheduled job that's resetting your permissions. Anything in the logs? You know approximately when it happened (something between the time you hit the pillow and the time you got up).
Thanks for the info.
I looked thru the logs, found that chron.hourly is running msec, which sets umask 0022. I've been looking for a way to make this not apply, somehow, to the /home/ftp directory. The reason why I need this file set to 777 for uploads is becaue it's the initial login directory for all FTP users. If I don't have it set to execute they can't log in.
An easy fix would be to top chron.hourly, but this also changes permissions on serveral log files from 644 to 640, so I don't want to totally disable it.
I was having a similar problem with a directory in my home folder. acid_kewpie was kind enough to help me. Msec was resetting the permissions so that only the owner of the folder could write to it. Try sharing the folder elsewhere. here is a link to my thread http://www.linuxquestions.org/questi...threadid=60631
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.