1

I have recently worked on a site for a client and worked on an acquia devdesktop to make changes on a Windows machine. The production site is on a linux server and I am trying to deploy the site on a digital ocean ubuntu server running nginx. For some reason my file and folder permission are completely messed up. I have gotten the site to the point where some images show up, but my themes and content are still behaving strangely. I followed what I thought was the procedure:

  1. Set up a clean installation.
  2. Migrate the database
  3. copy the sites folder
  4. run the update script

I ran though a series of issues with folder permissions, and was able to squash most of the bugs. I don't get any meaningful to me warnings in the admin/status/reports, and near as I can tell I've tried to follow the correct permissions for files and folders.

site --> 775
site/default -->775
site/default/files --> 775

UPDATE: So, I guess part of the issue had to do with an .htaccess file htaccess file issues, but I still had a mess of warnings regarding the folder and ownership permissions. I guess the environments are really unfriendly to one another. This a big site with 85+ modules enabled. The annoying part is that I could only piece together the diagnoses from the php warnings. I finally hit a wall a WSOD.

2

Try to give more information about the files/directories. What user/group owns the files? You should also make sure you know what user nginx is running on. Try these commands for debugging:

ls -l for printing details about file permissions and ownership

ps -ef to check running processes to see if any user stands out (like www-data or www, figure out which user nginx uses)

Files in sites/default/files should be rw- permissions, and directories in sites/default/files should be rwx permissions. rw- is 6 and rwx is 7.

The file: -rw-r--r-- 1 ubuntu www-data 468 Dec 10 15:59 test.php is owned by the ubuntu user and the www-data group. The ubuntu user can access the file with read/write, and the www-data can only read the file. If this file were in sites/default/files it would be a problem, because the webserver wouldn't have rights to remove it.

0

Rebuild the registry and also change ownership of file folder to www-data:www-data. To rebuild the registry you can use below drush command.

drush rr

After rebuilding registry clear the cache.

  • silly question, would creating a site archive on my dev machine, and then importing the archive with drush work? – nizz0k Dec 10 '15 at 21:44

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.