• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Permission problem

apke2k

New Pleskian
Panel version 10.4.4 Update #47

I've never done all this before :

I uploaded a zip file for a website and I extracted all the files for a joomla website.
I added a new database.
I added a new database user (username and password)

Took a look at the configuration.php file, changed the user, the password, the database, the log_path and the tmp_path.
I saved it and that's when I got the following error :

Unable to change directory to //websiteb: filemng: cannot change directory to '/var/www/vhosts/websitea.com//websiteb ' failed: Permission denied.
System error 13: Permission denied.

I can no longer access the websiteb directory.
I can't even remove the directory.
I'm not sure what I've done wrong but I do have a few questions.


1) How do I get access to the directory and the configuration file ?

2) There's probably something wrong with the path.
If I manage to get access, how do I know what path to use ? Where do I find it ?

3) Probably unrelated. I was following instructions and I had to type an underscore before the username and databasename, even though I didn't use an underscore. Why is that ?

Thank you.
 
You didn't say how you uploaded the zip file and how you extracted it.

The thing is, all website files need to go in /var/www/vhosts/domain.tld/httpdocs/ and this is the path you need to use unless you are installing in a subdirectory below that, in which case you need to add that to the end of the path.

If you put files anywhere else they will not be accessible from the web and things will go wrong (but note that I'm not talking about subdomains or what have you -- just a real, full, single domain in a Subscription)

When you unzip something, the ownership of the extracted files can be totally unrelated to the user you need to own the files. If depends how you unzip them and a few other things too.

So I'm guessing that
1) You need to change where you are unzipping your file
2) The ownership and possibly permissions are wrong on the extracted files/directory.

So firstly you need to change the ownership to match the group and user. Take a look at some files that are in /httpdocs (e.g. the default Plesk index.html holding page) and see what the correct owner and group should be. Usually it is ftpuser.psacln (where ftpusr is the FTP username). Similarly check permissions on the files(s).

You would normally do all this via SSH. You may need to make your changes as the root user. If you are trying to do everything via File Manager then maybe that's limiting what you can do as I think it won't be able to access any files that are not ftpuser.psacln.
 
Faris,

Thank you for your help so far.

My hosting provider changed my permissions and I'm now able to access the files.
( I'm gonna start a new threat on that because I would like to know how to change permissions.)
I still don't understand why the permission settings changed.
Needless to say, I don't want this to happen again because it took my hosting provider 5 days to fix it.

I use several domains. They all use different directories.
The files of the first domain are in httpdocs
The files of the other domains were given other directories.
I was told using httpdocs is not a requirement for those domains.
Websites in those directories are visible on the internet.
I lost permission to access one of those directories when I was changing the config file inside the directory.
The things I changed was the username, database name and the path.
I'm 100% sure I used the wrong path but that shouldn't be causing a permission problem.


I used Add New File to add the zip file and I clicked on Extract Files to unzip.
All was good. Until I started changing the config file and saved the changes.
I'm not comfortable enough with the command line to start using SSH.
I don't want my problems to get any bigger than they already are.
 
Whan you add a second or subsequent domain in a single Subscription (or you add a subdomain), you get to choose a directory name where the files will be located, under the main domain. The default is site1, site2 etc e.g

/var/www/vhosts/domain.tld/httpdocs (main domain in subscription)
/var/www/vhosts/domain.tld/site1 (second domain in subscription)
/var/www/vhosts/domain.tld/site2 (subdomain for other domain in subscription)

And there are the paths to use.

Yes, changing username details in a joomla config file should not change your permissions/ownership unless Joomla does something really odd.
 
Back
Top