littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
629 stars 112 forks source link

Tons of "no such file or directory" errors for staging/dev files #79

Closed gabrielstuff closed 2 years ago

gabrielstuff commented 3 years ago

Hello,

After a fresh install on Digital Ocean Ubuntu 20.04 LTS, I've got the following RED warnings :

SS-PERMS: Resetting all file permissions across entire SlickStack server...
addgroup: The group `wordpress' already exists.
The user `mina' is already a member of `wordpress'.
The user `www-data' is already a member of `wordpress'.
The user `mina' is already a member of `www-data'.
chown: cannot access '/var/www/html/staging/wp-content/functions.php': No such file or directory
chown: cannot access '/var/www/html/staging/wp-content/blacklist.txt': No such file or directory
chmod: cannot access '/var/www/html/staging/wp-content/functions.php': No such file or directory
chmod: cannot access '/var/www/html/staging/wp-content/blacklist.txt': No such file or directory
chown: cannot access '/var/www/html/dev/wp-content/mu-plugins': No such file or directory
chown: cannot access '/var/www/html/dev/wp-content/functions.php': No such file or directory
chown: cannot access '/var/www/html/dev/wp-content/blacklist.txt': No such file or directory
find: ‘/var/www/html/dev/wp-content/mu-plugins/’: No such file or directory
find: ‘/var/www/html/dev/wp-content/mu-plugins/’: No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/mu-plugins/autoloader.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/mu-plugins/xxx-common.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/object-cache.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/functions.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/blacklist.txt': No such file or directory
chown: cannot access '/var/www/html/staging/wp-content/functions.php': No such file or directory
chown: cannot access '/var/www/html/staging/wp-content/blacklist.txt': No such file or directory
chmod: cannot access '/var/www/html/staging/wp-content/functions.php': No such file or directory
chmod: cannot access '/var/www/html/staging/wp-content/blacklist.txt': No such file or directory
chown: cannot access '/var/www/html/dev/wp-content/mu-plugins': No such file or directory
chown: cannot access '/var/www/html/dev/wp-content/functions.php': No such file or directory
chown: cannot access '/var/www/html/dev/wp-content/blacklist.txt': No such file or directory
find: ‘/var/www/html/dev/wp-content/mu-plugins/’: No such file or directory
find: ‘/var/www/html/dev/wp-content/mu-plugins/’: No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/mu-plugins/autoloader.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/mu-plugins/xxx-common.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/object-cache.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/functions.php': No such file or directory
chmod: cannot access '/var/www/html/dev/wp-content/blacklist.txt': No such file or directory

I can't access to the dev and staging website, they always redirect me to the production site. Should I run something in prior to try dev or staging ?

jessuppi commented 3 years ago

Hello @gabrielstuff thanks for your feedback,

Staging and Dev sites are still not fully supported at this time. A few months ago we had a security concern regarding SFTP credentials and the way that the Dev site was setup, so we delayed implementing the Dev site feature.

The Staging site technically works already, but only as a subdirectory /staging/ website.

Please stay tuned for an update and let us know if any suggestions --

gabrielstuff commented 3 years ago

Ok, clear, good to know. Thanks. Can we help somehow ?

jessuppi commented 3 years ago

@gabrielstuff Yes please feel free to make suggestions in this Issue or other Issues at anytime. You can also submit a Pull Request if you are confident in your suggestion but discussing things first is probably a better approach --

jessuppi commented 2 years ago

This Issue is rather irrelevant now, since staging/dev sites are working now and many previous bugs are fixed.

The reason for many of the errors seen in this Issue is because we previously had not implemented conditional checks into the various bash scripts like this example:

if [[ "$STAGING_SITE" == "true" ]]; then 
    chown -R www-data:wordpress /var/www/html/staging/wp-content/temp
    chown -R www-data:wordpress /var/www/html/staging/wp-content/upgrade
    chown www-data:wordpress /var/www/html/staging/wp-config.php
fi

Ref: https://github.com/littlebizzy/slickstack/blob/master/bash/ss-perms-wordpress-core.txt

We've since added these checks (if staging and/or dev site is enabled) into many different bash scripts so that certain snippets only run if either staging and/or dev sites have been specifically enabled in ss-config.

There might still be a few "if statements" missing, so feel free to comment below or create a new Issue.