some or all of the following paths must be writable: js, src/addons, styles, src/XF/Repository/AddOnRepository.php

Kulas

Administrator
Staff member
writable.png

The error message indicates that the web server user doesn't have write permissions to certain directories, preventing the installation from an archive. To resolve this issue, you need to ensure that the web server user has write access to the required directories.
Required directories:
    • XF root directory
    • js/
    • src/addons/
    • styles/
    • src/XF/Repository/AddOnRepository.php (note: this is a file, not a directory)

Solutions:
1. Change ownership to the web server user

Run the following commands in your terminal, replacing www-data with your web server user (e.g., apache, nginx, etc.):

chown -R www-data:www-data /path/to/xf/root
chown -R www-data:www-data /path/to/xf/root/js
chown -R www-data:www-data /path/to/xf/root/src/addons
chown -R www-data:www-data /path/to/xf/root/styles
chown www-data:www-data /path/to/xf/root/src/XF/Repository/AddOnRepository.php

2. Set write permissions
Run the following commands:

chmod -R 755 /path/to/xf/root<br>chmod -R 755 /path/to/xf/root/js
chmod -R 755 /path/to/xf/root/src/addons
chmod -R 755 /path/to/xf/root/styles
chmod 755 /path/to/xf/root/src/XF/Repository/AddOnRepository.php

if invalid user: ‘www-data:www-data’
The error "invalid user: 'www-data:www-data'" typically occurs when:
    • The user 'www-data' doesn't exist on your system.
    • The syntax for setting ownership is incorrect.

Solution:
1. Check the web server user

Run the command:

ps aux | grep -i httpd
or

ps aux | grep -i apache
This will show you the user running your web server process.

SAMPLE OUTPUT

root 1634 0.0 0.6 83540 12008 ? S 09:40 0:05 litespeed (lshttpd - main)root 1650 0.0 0.0 8720 1540 ? S 09:40 0:00 httpd (lscgid)
nobody 1728 0.1 0.7 341036 13948 ? Sl 09:40 0:07 litespeed (lshttpd - #01)
nobody 1729 0.0 0.7 341552 14024 ? Sl 09:40 0:06 litespeed (lshttpd - #02)root 30733 0.0 0.0 12220 1100 pts/0 S+ 11:49 0:00 grep --color=auto -i httpd

running LiteSpeed Web Server. The output shows:
    • The main LiteSpeed process (lshttpd) is running as root.
    • The lscgid process (a CGI daemon) is running as root.
    • Worker processes (lshttpd - #01 and lshttpd - #02) are running as nobody.

Set ownership to nobody
To resolve the permission issue, set the ownership of the XenForo directories to nobody

chown -R nobody:nobody /path/to/xf/root
chown -R nobody:nobody /path/to/xf/root/js
chown -R nobody:nobody /path/to/xf/root/src/addons
chown -R nobody:nobody /path/to/xf/root/styles
chown nobody:nobody /path/to/xf/root/src/XF/Repository/AddOnRepository.php

Alternative: Set ownership to root
If you prefer, you can set ownership to root instead:

chown -R root:root /path/to/xf/root
chown -R root:root /path/to/xf/root/js
chown -R root:root /path/to/xf/root/src/addons
chown -R root:root /path/to/xf/root/styles
chown root:root /path/to/xf/root/src/XF/Repository/AddOnRepository.php

However, setting ownership to root may raise security concerns.
 
Back
Top