Permission issues? FTP and Apache permission denied?

Hey guys so i’m new to Virtualmin only really have experience with cPanel but a friend of mines website took off so we had to move him to a dedicated server. Since we didn’t want to pay the $25 a month for cPanel we chose Virtualmin because you can import cPanel backups.

So i created the backup and imported it into Virtualmin without any issues, the website works fine except for when i login to Wordpress or through FTP.

When i login through FTP and try to edit/create/remove/etc it gives me a permission denied error.

When i login to Wordpress it tells me that my config file and directories are not writable. I tried chmod the directories and config file to 755 but still have the same issue.

The only thing i can think is that is it some type of permission issue having to do with users or groups. Does anybody have any suggestions or can anybody help me with this? I’ve spent numerous hours just trying to figure it out searching google but still can’t seem to figure it out.

Thank you so much for any help in advance!


Well, my initial guess for Apache is that it may be setup for mod_php, which could cause some permissions issues… take a peek in Server Configuration -> Website Options, and see what PHP Execution Mode it’s set to. If you can, I’d typically recommend either CGI or FCGID.

However, I’m not sure why you’d be getting those FTP errors. What user are you using to login via FTP, are you using the Virtual Server owner (ie, the domain’s admin account)?

We may need to review what user the files are owned by, and then compare that to the directory they’re sitting in… but we’ll get to that if the above ideas don’t help :slight_smile:



Thank you for the quick reply, i originally had it setup for FCGID but anytime i loaded a PHP file it would throw me an Internal Server 500 error and this is what i would see in the apache error log:

[Wed Jan 26 14:06:48 2011] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.

[Wed Jan 26 14:06:48 2011] [error] [client] Premature end of script headers: index.php

I searched all over and only solution i could find on Google was to change it to mod_php and try that. When i did that the PHP file loaded file and the entire website works without any issues, but when i login to Wordpress i get this error thrown at me in apache error log:

[Wed Jan 26 15:26:49 2011] [error] [client] PHP Warning: fopen(/home/lthrsst1/public_html/blog/wp-content/db-config.ini) [function.fopen]: failed to open stream: Permission denied in /home/lthrsst1/public_html/blog/wp-content/db.php on line 669

Now when i go into the file manager it has these settings:

User: simplescripts

Group: lthrsst1

Do i just need to change the user to reflect the lthrsst1? Like i said above this was an import from a cpanel account that was hosted with BlueHost, i’m not sure if simplescripts was a user they setup for installing Wordpress or what not we were just having major problems with BlueHost so we decided to purchase a dedicated server.

So what do you think?

Thanks for all your help!


It does sound like there’s a username mismatch somewhere in there.

The key is to figure out what username should actually own those directories… from what you’ve described above, it sounds like that may indeed be “lthrsst1”.

You may want to take a look at the Apache config block, to see what SuexecUserGroup is being used to execute the PHP in your homedir. That should help you figure out what username and groupname should own all those files and dirs.

Also, from the above error output, it sounds like the directory it thinks your public_html folder exists in is here: /home/lthrsst1/public_html

You may want to verify that’s the case in your setup.


I have problem with permission ftp too. I have vps only for one website.
I login virtualmin as root and:

1)I created virtual server
2) I clicked edit FTP users and Add a user to this server.
3) Next , I wrote my username ( for example book), pass, and clicked Other user permissions and then I changed Login permissions to the email and ftp and gave Granted access to my database

When I login to my ftp acount using username “book” I’m succesfully connecting but my home directory is /home/mydomian/homes/book. I would like to change it on /home/mydmain/public_html

When I try just move files from directory “book” to “public_html” i get the message :550 myfile: Permission denied

What I’m doing wrong ?


It sounds like what you want is an FTP access user.

To create one of those, go into Edit Mail and FTP Users, and click “Add a website FTP access user”.

That will create a user with a home directory located inside your public_html folder, and also has permissions to make changes to those files/dirs.