Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab since it requires sudo commands.

The script runs fine most everynight but once a week, the external HDD directory somehow gets it permissions changed from being accessible to all users to only being accessible to the root user. This causes our backups to fail, and this is no good. To further explain:

the directory, /media/ gets duplicated into /media/_ which has no permission issue. It's like the name just got changed to have an underscore at the end. This one has all of the right data in it and is fine. The root one (/media/) is actually empty when I get in there.

I am not heavily experienced with linux. I just know how to get around and issue simple commands. I do not know the ins and outs of the kernel and what could be causing the issue. I have no clue what is going on here. I am open to any suggestions. Please let me know if I am doing anything wrong/insecure.

Let me know if this needs to be further explained.

-Zac

share|improve this question
    
If the permissions of your directory are changing, there has to be something doing this. I don't think somebody external will be able to tell you who/what is changing your permissions, because we don't know your computer. If you see some pattern, like for example the permissions change every sunday night at 00:00, then I would check through all crontabs if there is possibly a job doing something like this. –  mauro.stettler Feb 18 '13 at 4:51
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.