So i run the necessary permission commands for my Magento installation, i then notice the permissions change by them self and some folders all of a sudden have no permissions set, for example in the /var folder, only a few have permissions set. Why would this happen?

  • because you have different users running commands
    – MagenX
    Apr 19 '17 at 13:17
  • @MagenX will you elaborate your comment.
    – Adnan
    Dec 12 '17 at 23:27
  • so hosting have php user, apache user, or even stack master user, like bitnami/daemon, etc, and then probably he logins as root and run his own commands... magento when execute scripts it will use php/apache user with permissions set in config file, etc.. we dont know his environment...
    – MagenX
    Dec 14 '17 at 20:03

Execute these commands to set the sticky bit:

find var vendor pub/static pub/media app/etc -type f -exec chmod g+s {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod g+s {} \;


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.