Centos - Newbie Question (LAMP)

Posted on 2009-04-26
Last Modified: 2012-05-06

I'm trying to configure a server to act as internet server.  I think I've got it but I'm unable to test php because I cannot add a file to /var/www/html

All I get is an error message - " you do not have the permissions necessary to save the file"

It sounds like a simple error to fix however I'm a complete newbie when it comes to Linux (I'm talking about a days experience)

Question by:andyw27
    LVL 7

    Expert Comment

    Try doing it as root.  type "su -" then enter the root password, you would have entered it when you did your install.  

    Author Comment

    Can I not just change the permissions of the folder?

    The choice to do this appears to be there except its all greyed out?
    LVL 29

    Accepted Solution


    are you trying to add a php page in /var/www/html directory ??
    currently to create any file or edit from that directory you need root previliges

    so as @Martin said, use root password ro su - command to become root.


    Or Createa group suppose Developer

    change the permission of the www directory from root to developer

    chgrp -R Group_name Directory_name

    and insert your name in that directory. so you will have permission to edit by your self
    but as a new user, you should use root permission for this.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now