Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

CHMOD -R 777 or CHMOD -R 755

AldebaronAldebaron New
edited November 14 in Vanilla 2.6 Help

Hello everyone,
New installation
I would like to know the chmod (number) permission to put when installing the forum on a remote server and not local test server.

Confirm the cache, conf, and uploads folders are writable by PHP.

What that mean?
I need to put 777 or 755?
Recursion or not: **-R **or only the folder?
like: chmod -R 777 or chmod -R 755?
chmod 777 or chmod 755 just the folder only?

Thank you very much for your answer
Best regards

Comments

  • never ever do 777 on web files. chmod 777 is pretty much never needed. It has been encouraged by cheap old school shared hosts, becuase they provide little in the way of server management. But is bad practice and lazy.

    Permission actually largely depend on setup, there is no one size fits all. Firstly you need to know the web process user (or in some cases the user assign to run the CGI). Assign that user to he writeable folders only. Then generally 775 is more than sufficient.

    grep is your friend.

    Aldebaron
  • AldebaronAldebaron New
    edited November 15

    Super merci "Shifu", with your response i must put this 3 folders with 775 permission chmod.
    cache, conf, uploads.
    But the last question: recursively or not for the folder and files?
    chmod -R 775
    chmod 775

    Best regards

  • techically the process user needs to be able to write to conf/config.php the other file in conf there is no reason to give write permissions. So it is the folder plus that file. The others recursively.

    like I say you need to know the process user. often www-data, but could be anything.

    grep is your friend.

  • @Aldebaron said:
    cache, conf, uploads.
    But the last question: recursively or not for the folder and files?
    chmod -R 775
    chmod 775

    Adding to @x00 ... No. Only directories need be executable.

    Aldebaron
  • AldebaronAldebaron New
    edited November 15

    Youpi!!! Thank you all for your response

    resume:
    cache, conf, uploads: chmod 775 only folders

    I realy appreciate
    thank

  • x00x00 MVP
    edited November 16

    donovanb is making a distinction between executable and writeable. Pre existing file don't need to be executable.

    The order is of the numbers is user then group then others

    # Permission rwx Binary
    7 read, write and execute rwx 111
    6 read and write rw- 110
    5 read and execute r-x 101
    4 read only r-- 100
    3 write and execute -wx 011
    2 write only -w- 010
    1 execute only --x 001
    0 none --- 000

    The long of the short is you should know/assign the user an group before considering permissions otherwise you could be making a misstep.

    If you your host doen't allow this (e.g ftp only site), you are wasting your time with that host. Now you can get cheap servers you can ssh to.

    grep is your friend.

    Aldebaron
  • AldebaronAldebaron New
    edited November 16

    Hello x00
    Thank you for your quick reply.
    In fact I'm about to give up this permission story that confuses me. The ftp software that I use allows me to put the permission
    Cyberduck, Transmit
    either by checking or by putting numbers.
    Me who is a bit noob and who asks to learn. It looks like a Gordian knot or kafka book.
    Do you have a simple answer for me?
    What do I do with these folders and files?
    With numbers if possible. I thank you a thousand times in advance for your help.
    for now I understood that it was necessary to put the file only in reading and writing
    775
    and especially not recursively -R 775
    thank you very much in advance
    Best regards

  • normal ftp is not goign to set the user or group. Server management comes with a learning curve.

    grep is your friend.

  • good evening x00
    Thank you for your answer, so what do you advise me to do?
    Because for me there I am in confusion. I do not understand anything anymore.
    Confirm the cache, conf, and uploads folders are writable by PHP
    I have a shared server that does not allow me too much use of ssh.
    I will probably use an ftp software as mentioned above.
    What do you advise me for the beginner that I am
    I'm just used to wordpres and drupal right now and I have not had that kind of difficulty.
    Thank you shifu
    Best regards

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Be as restrictive as possible:

    Start with 755
    If that doesn't work use 775
    If even that is not enough you must use 777 (and consider changing the hosting service)

    Using FileZilla or any FTP client is fine if your only option is chmod (and not chown)

  • Hello
    Thank you for your kindness,
    I will follow this explain.
    Start with 755
    If that doesn't work use 775

    Best regards

Sign In or Register to comment.