Hi guys,
I'm currently using Snipe-IT, an asset manager, and it currently installed at /opt/snipeit .
I recently receiving permission error when I'm upgrading b/c the composer needs to create its directory at home.
I've created a user and group named snipeit.
Code
stat /home/
File: ‘/home/’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 262145 Links: 5
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Code
ls -la /home/
total 20
drwxr-xr-x 5 root root 4096 Nov 20 2016 .
drwxr-xr-x 25 root root 4096 Nov 17 21:38 ..
Whenever I upgrade, and run this commands,
Code
cd /opt/snipeit
....
su snipeit -c 'php composer.phar install --no-dev --prefer-source'
su snipeit -c 'php composer.phar dump-autoload'
I receive this error:
Code
Cannot create cache directory /home/snipeit/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache Cannot create cache directory /home/snipeit/.composer/cache/files/, or directory is not writable. Proceeding without cache
Home is a root directory.
What's the best way to fix this?
Thanks in advance.