Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: 2nd HDD Permissions

  1. #1
    Join Date
    Jul 2017
    Beans
    38

    2nd HDD Permissions

    Please help step me through changing permissions for 2nd HDD to allow all users to read/write - have read through many posts but most goes over my head.

    /dev/sdb1: LABEL="HDD2" UUID="dcfb3e52-e7c8-4569-921b-7ed6e47bea4b" TYPE="ext4" PARTUUID="a28f670c-f56a-453e-ad79-cd79d8db552e"

    /dev/sdb1 on /HDD2 type ext4 (rw,relatime,data=ordered)

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    17,145
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: 2nd HDD Permissions

    Where is it mounted?
    How is it mounted?
    What are the current permissions?
    Which users do you want to have access?
    What type of access to you want them to have?

    Do you understand normal Unix permissions for files and directories?

    There is no secure method to allow every user to have read-write access to an entire directory structure.

    You can easily allow 1 user full read-write and control over permissions. Just make that userid the owner.

    If there are a few specific userids you want to provide read-write access, then place all those userids into a single group and make the groupid for the directory the group they all share and set the setgid permissions bit on the directory and set the group on the directory to have read-write permissions. Any new files copied in or created under that specific directory by anyone with group membership will inherit the permissions and read-write.

    But really, start by answer the first questions. Please show proof using commands, not an interpretation what you think. We need facts.

    For example,
    I mount a second storage area using the fstab. The important line looks like this:
    Code:
    /dev/mapper/ubuntu--mate--vg-stuff  /stuff  ext4 noatime,errors=remount-ro,noatime 0 2
    When it is mounted it looks like this:
    Code:
    $ cd /stuff/
    /stuff$ df .
    Filesystem                          Size  Used Avail Use% Mounted on
    /dev/mapper/ubuntu--mate--vg-stuff   99G  1.5G   92G   2% /stuff
    Inside the directory, the files/directories are this:
    Code:
    /stuff$ ls -al
    total 32
    drwxr-xr-x  5 root root  4096 Mar 19 16:27 ./
    drwxr-xr-x 31 root root  4096 Jul 27 09:02 ../
    drwxr-xr-x  5 root root  4096 Aug 10 19:12 extra_stuff/
    drwx--x--x  2 root root  4096 Mar 19 16:41 images/
    drwx------  2 root root 16384 Feb 28 16:55 lost+found/
    Which don't allow any non-root users to create files. See how root is the owner of everything?
    Code:
    /stuff/extra_stuff$ ls -al
    total 88
    drwxr-xr-x  5 root root  4096 Aug 10 19:12 ./
    drwxr-xr-x  5 root root  4096 Mar 19 16:27 ../
    drwxr-xr-x 29 tf   tf   16384 Jun 12 15:42 ale-mail-arch/
    drwxr-xr-x  2 tf   tf   57344 Mar 12 21:49 tmp-photos/
    drwxrwsr-x  2 tf   adm   4096 Jul  2 15:52 videos-tmp/
    Inside the "extra_stuff" directory, notice the videos-tmp/ directory. The owner is tf, the group is adm and the permissions are rwxrwxr-x plus the setgroupid permissions bit is enabled, which makes it so any member of the "adm" group can create files and edit files inside the videos-tmp/ directory.

    This method only works with Linux file systems, not NTFS, not exFAT, not FAT32.

  3. #3
    Join Date
    Jul 2017
    Beans
    38

    Re: 2nd HDD Permissions

    Quote Originally Posted by TheFu View Post
    Where is it mounted?
    How is it mounted?
    What are the current permissions?
    Which users do you want to have access?
    What type of access to you want them to have?

    Do you understand normal Unix permissions for files and directories?
    /HDD2
    Not sure
    Not sure
    Resilio Sync
    Any / all permissions Resilio Sync would need to sync folders on this drive - presumably read, write, create & delete files....?
    No unfortunately

    I can provide the output for any commands you request.

    Thanks for helping.
    Last edited by brenneke; 1 Week Ago at 01:43 AM.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    17,145
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: 2nd HDD Permissions

    Sorry, some of those answers don't help me at all. Please use the commands like I've shown to provide the data. You'll need to change them for the specifics of your system locations. I showed the minimal information.

  5. #5
    Join Date
    Jul 2017
    Beans
    38

    Re: 2nd HDD Permissions

    Quote Originally Posted by TheFu View Post
    Sorry, some of those answers don't help me at all.
    Sorry man, they were your questions not mine.


    Quote Originally Posted by TheFu View Post
    I showed the minimal information.
    Yes you did.


    Just to remind you - we all have our special areas of expertise - you are incredibly talented in this realm I am sure - when you need advice in areas outside of your specialty I am sure you are grateful to those who are patient to teach and explain. This is a forum where those who don't know, ask.
    Last edited by oldos2er; 1 Week Ago at 03:40 PM. Reason: Please keep it family-friendly.

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 2nd HDD Permissions

    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Jul 2017
    Beans
    38

    Re: 2nd HDD Permissions

    Quote Originally Posted by oldfred View Post
    Never heard of Resilio-Sync
    https://www.capterra.com/p/173194/Resilio-Sync/
    It seems to be a paid backup solution. Most with Linux use built in Linux tools for backup.
    2-way sync, multi platform, back-up only also if you wish.
    https://www.resilio.com/individuals-sync/
    https://www.linuxbabe.com/ubuntu/ins...tu-16-04-16-10

    What is UEFI?

  8. #8
    Join Date
    Jun 2014
    Beans
    5,345

    Re: 2nd HDD Permissions

    In post # 3 above, you indicate that your hard drive is mounted at /HDD2 which would mean you or some other user of your computer manually created the mount point. If that's the case, obtaining user:group and permissions would be as simple as using the command:

    Code:
    ls -l /HDD2
    The how is it mounted questions would be either configured to have the system mount or you as the user manually mount it using the mount command. Often, external drives are available under the /media or /media/username directory and can be mounted by simply clicking on the entry in the file manager. Have you created an entry in the /etc/fstab directory to mount the external drive partition(s) at the location you specified in your post, /HDD2?

    The links below give detailed explanation of user:group permissions on Linux. The last link below gives detailed info on UEFI.

    https://www.linux.com/learn/understa...le-permissions

    https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions


    https://www.howtogeek.com/56958/htg-...lace-the-bios/



    Last edited by yancek; 1 Week Ago at 12:07 PM.

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    17,145
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: 2nd HDD Permissions

    Quote Originally Posted by brenneke View Post
    Sorry man, they were your questions not mine.
    The questions were asked in an attempt to help you get to a good solution. No other reason.

    Quote Originally Posted by brenneke View Post
    Yes you did.
    The minimal way to get the required information is what I showed using a real example that I hoped you could follow. It would save time for you and us to have that data. If you don't understand something, please tell us. Nobody knows all this stuff. I had to check that the commands already posted would actually provide the needed data and not leave anything out. I did that hoping not to waste any of your time, so a solution would be quicker.

    There is no way for someone here to know your level of expertise. We are chastised for under estimating someone's knowledge. We are chastised for over estimating someone's knowledge. We really just want to help you get a working solution, perhaps even the best possible solution.

    I showed commands in a logical order for what will be necessary to the solution.

    How the storage is mounted matters, so I asked. If it isn't mounted in the needed way, then we need to fix that.

    Which file system it uses matters. If the wrong file system is used, we can't fix it without drastic, usually painful, changes. The wrong file systems don't support Unix permissions.

    Defining the required permissions based on some software is only slightly helpful. In general, backup tools need to be run as root or the software cannot access and store the data. This is pretty standard across all Unix-like computers. Knowing that it is for backups means we probably really don't care about all the permissions, provided it is a Unix file system, since root will have access if it is mounted read-write, not read-only.

    With exact examples, you can look up each command and the options to learn what is being requested. That is faster for you and it doesn't waste the time of others.

    Can you please try to run the commands I've shown, modified for your specific system, with the top directory changed to what makes sense on your computer, we could get the solution you seek. Basically, that means to use /HDD2 in the commands where I've used /stuff. If you don't understand and google doesn't answer sufficiently, please as a specific question that can be answered. Can't tell if you aren't answering because you don't want to or for some other reason. Please help us to help you.

  10. #10
    Join Date
    Jul 2017
    Beans
    38

    Re: 2nd HDD Permissions

    Quote Originally Posted by yancek View Post
    In post # 3 above, you indicate that your hard drive is mounted at /HDD2 which would mean you or some other user of your computer manually created the mount point. If that's the case, obtaining user:group and permissions would be as simple as using the command:

    Code:
    ls -l /HDD2

    Code:
    gw@GW:~$ ls -l /HDD2
    total 16
    drwxrwxrwx+ 5 gw gw 4096 Feb 14 11:39 Backups
    drwxrwxrwx+ 6 gw gw 4096 Oct  1  2018 Documents
    drwxrwxrwx+ 5 gw gw 4096 Oct  2  2018 Phones
    drwxrwxrwx+ 6 gw gw 4096 Mar 17  2017 Plex
    gw@GW:~$
    From: https://blog.benjie.me/installing-re...-regular-user/

    "By default, Resilio runs as rslsync user. This can cause annoying permisison errors some times."

    Would I be right is saying that I need to give User rslsync same permissions as gw to HDD2?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •