#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Posts
    7
    Rep Power
    0

    Folder Permissions


    Hi

    Ive just installed LAMP on my system.

    I don't have any permission to edit in the var/www/html directory. (html)

    I know, and do use sudo chmod -R 777 html to change that directories permission so I can edit the files in there with my
    editor.

    Is this a safe practice? What can go wrong.

    I aslo intend to port forward my router so I can have my own web served to me via my static IP address.. What is the best permission for the html directory for security purposes..

    Thank You..
  2. #2
  3. Impoverished Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,739
    Rep Power
    9646
    Exactly what you should do is debatable, and varies a bit with Linux distro.

    Are we talking about your personal computer? Or a separate Linux server set up for this? How often will you be changing files? Do you want to learn "proper" deployment practices or just want something fast and easy to work with?

    Regardless, chmod 0777 is bad so don't do it. File permissions exist for a reason and making everything be world-writable is the exact opposite of how they should be used. Plus there's the often overlooked fact that doing so also makes files executable when they definitely should not be.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Posts
    7
    Rep Power
    0
    Oh.. Thats scary but informative...

    I should have stated its on Raspberry Pi Zero. Amazingly it really works. chmod 0777 is band from my wee PI..

    Thx for your help......

IMN logo majestic logo threadwatch logo seochat tools logo