Knowledge Base


Knowledge Base / XFilesharing Pro / Troubleshooting

Couldn't write 'XFileConfig.pm~' (or XFSConfig.pm~): Permission denied

03/12/2021 05:56 AM
Question
When saving the site's settings I'm getting one of the following errors:

Couldn't write 'XFileConfig.pm~': Permission denied
Please check that CGI dir is writeable by user

ID=1 srv1...FAILED: Couldn't write 'XFSConfig.pm~': Permission denied
Please check that CGI dir is writeable by user

Answer

The script needs enough UNIX permissions to create a temporary file in the cgi-bin directory in order to safely save the config. Please login on your main server (in the case of XFileConfig.pm) or on corresponding file server (in the case of XFSConfig.pm) and ensure that

1. The UNIX mode of the cgi-bin/ and cgi-bin/logs/ directories equals to 0755
2. The cgi-bin/ directory and all files in that directory belong to the user who is running the scripts.

Or if you can't do (2) because you don't know which user is running the CGI scripts on your web server, you can set 0777 to cgi-bin/ and cgi-bin/logs/ alternatively.