Guest harisp Posted February 11, 2008 Report Share Posted February 11, 2008 I'm not sure that this is the right place to post this, but I'm trying to set up a server using 2007 version. I have apache installed and all the html files are in /var/www/html/ but when I try to edit any files or add something in that directory it's telling me that the directory is not writeable. The user that is logged in should have all root and su permissions, but it still won't let me do it. It's also giving me problems with installing mysql. Any help would be appreciated. [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted February 11, 2008 Report Share Posted February 11, 2008 What user were you logged in as? No user has root privileges by default and it is not wise to give a user root privileges either. Should your system be compromised, it's much easier for them to do lots of damage. Files in /var/www/html by default are either owned by root or apache. Sometimes, apps require that apache own the files, so that the config files can be modified, for example - installing joomla. If you want to edit the files as root, you can do this: In gnome: gksu program /var/www/html/filename.ext in KDE: kdesu program /var/www/html/filename.ext for example. Or from command line: su (enter root password when prompted) program /var/www/html/filename.ext if you want to edit using vim/nano or whatever. MySQL will also have to be installed as root, and then you need to assign a password using mysqladmin to ensure that the root user within MySQL is protected - as by default is doesn't have a password. If you're still having problems, please explain in more detail what you are trying to do/achieve, and then we can provide more specific instructions to help. Quote Link to comment Share on other sites More sharing options...
SilverSurfer60 Posted February 11, 2008 Report Share Posted February 11, 2008 Welcome to MUB. Ian has beaten me to it so I'll just leave the welcome. Quote Link to comment Share on other sites More sharing options...
Guest harisp Posted February 11, 2008 Report Share Posted February 11, 2008 All I'm trying to do with that directory is put html files. I'm logged in as admin with access to all the directories but I cannot write to it. If i'm using an editor like NVU i cannot save to there? Is there a simple way to do so? Also with MySql I'm installing it through the console so i do log in as su and put in the correct password and all but when I try to run the line /scripts/mysql_install_db it just tells me that I cannot create the tables. Thanks for the help Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted February 12, 2008 Report Share Posted February 12, 2008 If you're using nvu, then use the command I suggested with gksu in Gnome and kdesu in KDE before you launch nvu. Then it will run nvu as root, rather than your whole system being able to access root privileges. Alternatively, change the ownership of /var/www/html to admin and then admin can save there. chown -R admin:admin /var/www/html it's important that R is upper-case to ensure folders are recursively selected and owner-rights reset. Where did this mysql script come from? How are you trying to run this script, and what is the contents of this script? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.