ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    NextCloud: Chmod user folders

    IT Discussion
    nextcloud ubuntu 18.10 ubuntu server permissions chmod
    2
    3
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse
      last edited by

      A few weeks ago - I had an issue with NC, and I'm finally getting it polished back up. Which reminds me - I need to go make a snapshot of the instance before I get much more done.

      That being said, I sftp the files back up to the user folders and ran the appropriate scan post upload. Sadly - I ran into a permissions issue - as >root< was the user that uploaded the files, it needs to have the web-html set as permissions;

      root@TuDallasNC:/var/www/html/data# ls -l
      total 508
      drwxr-xr-x 10 www-data www-data   4096 Dec 31  2019 appdata_ocadq1l3jz0x
      drwxr-xr-x  3 root     root       4096 Jul 21 22:19 User13
      drwxr-xr-x  2 www-data www-data   4096 Dec 31  2019 files_external
      drwxr-xr-x  5 www-data www-data   4096 Jul 21 22:20 User9
      drwxrwxr-x  3 root     root       4096 Jul 21 22:21 UserNamehere
      drwxrwxr-x  5 root     root       4096 Jul 21 22:28 Nothing2Chere
      -rw-r--r--  1 www-data www-data      0 Jun 23 22:59 index.html
      drwxr-xr-x  3 root     root       4096 Jul 21 22:37 StressOut
      drwxrwxr-x  5 root     root       4096 Jul 21 22:39 RedMouse
      -rw-r-----  1 www-data www-data 427801 Jun 24 23:57 nextcloud.log
      -rw-r--r--  1 www-data www-data  38660 Jun 23 22:58 updater.log
      drwxr-xr-x  4 www-data www-data   4096 Jun 23 22:59 updater-ocadq1l3jz0x
      drwxr-xr-x  4 www-data www-data   4096 Dec 31  2019 user29801
      
      

      I was going to say I fixed the Read/Write permissions, but I see that is incorrect. I will have to sort that out.

      But, www-data should be the owner / group. The syntax I followed did not set it, and I am curious if the Google-Fu lead me wrong.

      $ sudo chmod  www-data:www-data 775 -R /var/www/html/data/
      

      Was the command, however it returns an error:

      
      chmod: invalid mode: ‘www-data:www-data’
      Try 'chmod --help' for more information.
      

      The examples I have found seems to indicate that my syntax is correct - but it i is obvious it is not.

      1 Reply Last reply Reply Quote 0
      • gjacobseG
        gjacobse
        last edited by

        Oh - no - the syntax is incorrect for ownership.

        sudo chown

        1 1 Reply Last reply Reply Quote 1
        • 1
          1337 @gjacobse
          last edited by 1337

          @gjacobse said in NextCloud: Chmod user folders:

          Oh - no - the syntax is incorrect for ownership.

          sudo chown

          Yes,

          • chown to change owner
          • chmod to change mode (permission)

          Remember you can always do man chown to see the syntax.

          1 Reply Last reply Reply Quote 2
          • 1 / 1
          • First post
            Last post