3

A client's site images directory permissions have suddenly changed to 00. This means no one can access the directories content; not even the browsers. I cannot access the directory or change its permissions via FTP.

What could have caused this? Is there a way to reset the permissions?

  • What architecture? Is this a Linux server? Windows? – jmq Jun 11 '14 at 2:59
  • @jmp LAMP stack – MeltingDog Jun 11 '14 at 4:31
2

Permissions did not change by themselves, someone (or something) changed it. That could happen multiple ways:

  1. PHP Scripts changing permissions
  2. User changing permissions via FTP (chmod)

The thing is, to change permissions for a file or folder, you need to have write permission on that folder. This allows you to remove permission from yourself (which happened in your case), which sort of locks you out from accessing the files.

To be able to reset the permissions, you need to login as root and set them to be user-writable and group-readable (or group-writable if needed):

$ sudo chown -R u+rw,g+rx path/to/directory

If you do not have root access on your web-server nor any other way to configure reset permissions (like cPanel, but even that might not work), then you need to contact your hosting provider to do it for you.

0

Not without shell access that I can think of. Unless you have a control panel, then that should allow you to have indirect file level access. You may have to call tech support and ask them to change the protection to something that gives you access to the directory. After that, I would want to know how this changed. You may never know, but I would dig around anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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