• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

Permissions in file being set back every few minutes -wordpress

I had some problem (i dont know the reason) where my wordpress script woulndn't work ok, some modules wouldn't be shown for some file permissions (index.php files had "200" mod persmions), so when i set the permisions on those files at 777, all the script and the site works absolutely flawless... but... and here comes the but.

A few minutes later, its like if those permisions were set back to "200" and i can't again read the files and get the error.

what keeps changing these permissions back to 200?? I need them to be 777 or 755, and not changing back!!! I tried several times and it kept happening this thing. :(
0
celtician
Asked:
celtician
  • 3
  • 3
1 Solution
 
arnoldCommented:
You need to look at cron jobs first.

Which user is reflected as the owner of the files?

Are these files being regelated by a script/process?
0
 
celticianAuthor Commented:
No, these files are there, they have been created in 2009 actually, it looks like if it were running some auto-backup restore, as when i change the file permissions it shows the last date changed (now if i do it) and a few mins back it will show again 2009 with the old setting. this is really weird :S
0
 
arnoldCommented:
Check umask

777 is not advisable which OS and what do you setup?

You may have a snapshot restore when a "violation" which setting everything as 777 is.

What user is reflected as the owner of the files?

If you set permissions to 755/644 or double.

Is this your system or it is a VPS?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
celticianAuthor Commented:
So how should i set permissions? 755 instead?

its a shared hosting service on 1and1, the owner is a long number who i really dont know what corresponds to
0
 
arnoldCommented:
Yes, 755 for directories and 644 for files.
You should check with hosting support to figure out what is going.
 find . | while read a; do
If test -d "$a"; then
        chmod 755 "$a"
else
         chmod 644 "$a"
fi
done


Find will enumerate the files/directories, the test looks if it is a directory which will have 755 every other file is set to 644.

Hidden files/directories (.name) will not be included
0
 
celticianAuthor Commented:
Thank you, it worked
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now