Jump to content
thefirstofthe300

ANSWERED File Permissions Guide for New Linux Users

Recommended Posts

ang3lus

hello all

 

iam having a issue with my set up and i have been digging around for hours now and i just cant come right.

 

iam ruing opensuse leap kde plasma verson 5.12.8

 

i have installed emby and it has a user named emby

when i go to add the drive in the library i can not see the hdd and i have connected internally on my system

the mounting point is

 

  • /run/media/username/

 

in yast2 partioner device is /dev/sdb1

 

the output for

 

ls -l /run/media/username/
total 4
drwxrwxrwx 1 atlantica users 4096 Jan 12  2019 Samsung 2TBINT

 

in yast partitioner if i click on the drive and go to edit i get a fstab options in those options is this "rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096"

 

i hope that this all makes sence ... i was busy trying to take screenshots of everything but apparently that didnt work either , so had to try and type it all out and hoping i have entered in all the information that you need in order to help me.

 

i dont understand why i cant get it working because as a test before i had everything working on a different release of opensuse gnome i think not sure now.

 

but now that iam ready to nail down everything iam stuck again

 

anyway thank you for the help
 

 

Share this post


Link to post
Share on other sites
ang3lus

um

 

i can not figure out this i can not access /run/media/username/drivename/

Edited by ang3lus

Share this post


Link to post
Share on other sites
mastrmind11

hello all

 

iam having a issue with my set up and i have been digging around for hours now and i just cant come right.

 

iam ruing opensuse leap kde plasma verson 5.12.8

 

i have installed emby and it has a user named emby

when i go to add the drive in the library i can not see the hdd and i have connected internally on my system

the mounting point is

 

  • /run/media/username/

 

in yast2 partioner device is /dev/sdb1

 

the output for

 

ls -l /run/media/username/

total 4

drwxrwxrwx 1 atlantica users 4096 Jan 12  2019 Samsung 2TBINT

 

in yast partitioner if i click on the drive and go to edit i get a fstab options in those options is this "rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096"

 

i hope that this all makes sence ... i was busy trying to take screenshots of everything but apparently that didnt work either , so had to try and type it all out and hoping i have entered in all the information that you need in order to help me.

 

i dont understand why i cant get it working because as a test before i had everything working on a different release of opensuse gnome i think not sure now.

 

but now that iam ready to nail down everything iam stuck again

 

anyway thank you for the help

 

because you're mounting the drive as root/root (the 0,0 part of the command).  You need to mount it as a user and/or group that emby has access to.  You need to find out which id emby has on your system and use that, or add emby to a group and then use that group_id.  ALso, fyi the whole default_permission thing only gives the user rw access and the group just r, so if you plan to let emby do any metadata storing on that drive and you're not planning to set the user_id to whatever emby is, it won't work.  Plenty of info about fstab online, and the man pages are pretty easy to follow https://help.ubuntu.com/community/Fstab

Share this post


Link to post
Share on other sites
ang3lus

ok so i get this

 

 

linux-dxpa:~ # sudo blkid
/dev/sda2: UUID="74e11220-b4eb-409f-9b63-d7a96e68ab93" UUID_SUB="b1bfcc6b-e388-4c51-a328-6785c9c39423" TYPE="btrfs" PARTUUID="19271fdb-d3e1-4e4b-87be-d6e5b17c6fff"
/dev/sda3: UUID="abed5316-5e1d-4600-8db9-da1e15d717d5" TYPE="swap" PARTUUID="1e32dfa3-ec6f-46f4-bff6-c0c835f28163"
/dev/sdb1: LABEL="Samsung 2TBINT" UUID="7EF2C87AF2C83863" TYPE="ntfs" PTTYPE="atari" PARTUUID="60952cce-01"
/dev/sda1: PARTUUID="753d1e77-a026-42e5-a981-93c97582d7af"
 

 

 

linux-dxpa:~ # cat /etc/fstab
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /                       btrfs  defaults                      0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /var                    btrfs  subvol=/@/var                 0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /tmp                    btrfs  subvol=/@/tmp                 0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /root                   btrfs  subvol=/@/root                0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /home                   btrfs  subvol=/@/home                0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=74e11220-b4eb-409f-9b63-d7a96e68ab93  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=abed5316-5e1d-4600-8db9-da1e15d717d5  swap                    swap   defaults                      0  0
 

 

 

linux-dxpa:~ # sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500MX500SSD1  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: BC903D40-2244-46BE-B169-BC103FC37A4C

Device         Start       End   Sectors   Size Type
/dev/sda1       2048     18431     16384     8M BIOS boot
/dev/sda2      18432 972578815 972560384 463.8G Linux filesystem
/dev/sda3  972578816 976773134   4194319     2G Linux swap


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: SAMSUNG HD204UI
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x60952cce

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3907026943 3907024896  1.8T  7 HPFS/NTFS/exFAT
 

 

 

 

Share this post


Link to post
Share on other sites
mastrmind11

ok so i get this

you need to follow what I said in my last post.

Share this post


Link to post
Share on other sites
ang3lus

you need to follow what I said in my last post.

hi there sorry for the late reply ... took me a while to grasp what you said lol

i understand what you are saying after awhile but like iam at a lose on how to execute what i need to , iam getting so frustrated as i had it working before but i just can not recall what i did lmao.

Share this post


Link to post
Share on other sites
mastrmind11

hi there sorry for the late reply ... took me a while to grasp what you said lol

i understand what you are saying after awhile but like iam at a lose on how to execute what i need to , iam getting so frustrated as i had it working before but i just can not recall what i did lmao.

i literally told what you need to do.  change your fstab so you're not mounting the drive as root/root but instead emby/emby.  if you don't know the uid/gid for emby then google is nice:  https://www.carnaghan.com/knowledge-base/how-to-find-your-uiduserid-and-gidgroupid-in-linux-via-the-command-line/.  You also don't want default_permission in your fstab if you require emby to have write permission.  That's it.  Try it and come back if you get stuck, but you have to try first.

Share this post


Link to post
Share on other sites
ang3lus

Ok awesome thank you for finding that page , the search results I got were different but I can’t recall at the moment what they were. I will give this a good when I get back to the box

Share this post


Link to post
Share on other sites
nevolex
Posted (edited)

Here is the guide for those who re struggling to get the permissions sorted for the backup plugin on linux: 

 

sudo apt-get install cifs-utils

 

--Authenticate to SMB Share using Credential File created in /var
 
sudo vim /var/credentials
username=SMB_username
password=SMB_password

 

 

---Mount the share with Emby R&W access to /mnt folder:
 
sudo mount -t cifs -o credentials=/var/credentials,uid=emby,gid=emby  //192.168.1.2/path/to/my/folder /mnt         
 
 
----To get the share auto mounted after restart edit fstab
 
sudo vim /etc/fstab
 
//192.168.1.2/path/to/my/folder /mnt/path/to/my/folder cifs uid=emby,gid=emby,credentials=/var/credentials 0 0
 
 
------reboot and test
Edited by nevolex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...