Grant Write Permission to specific user for Home directory

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Grant Write Permission to specific user for Home directory

      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.

      Source Code

      1. stat /home/
      2. File: ‘/home/’
      3. Size: 4096 Blocks: 8 IO Block: 4096 directory
      4. Device: 801h/2049d Inode: 262145 Links: 5
      5. Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)


      Source Code

      1. ls -la /home/
      2. total 20
      3. drwxr-xr-x 5 root root 4096 Nov 20 2016 .
      4. drwxr-xr-x 25 root root 4096 Nov 17 21:38 ..




      Whenever I upgrade, and run this commands,

      Source Code

      1. cd /opt/snipeit
      2. ....
      3. su snipeit -c 'php composer.phar install --no-dev --prefer-source'
      4. su snipeit -c 'php composer.phar dump-autoload'

      I receive this error:

      Source Code

      1. 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.
      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 2 times, last by tinh_x7 ().

    • No one other than root can create anything in your /home/ directory. I'm also guessing snipeit doesn't create the snipeit home directory. I would do the following as root:

      mkdir /home/snipeit
      chown snipeit:users /home/snipeit
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!