Share Permissions

I have three hdd's mounted and want to share the folders in them. One works fin, no errors when sharing. But the other two both get "the permissions for /mnt ......prevent other users from accessing this share"

Post output after reading

$ lsblk -la -o PATH,FSTYPE,PARTTYPE
$ inxi -Fxxxza --no-host

and

welcome-01-sgs :slight_smile:

/dev/loop0        
/dev/loop1        
/dev/loop2        
/dev/loop3        
/dev/loop4        
/dev/loop5        
/dev/loop6        
/dev/loop7        
/dev/sda          
/dev/sda1  vfat   c12a7328-f81f-11d2-ba4b-00a0c93ec93b
/dev/sda2  ext4   0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sda3  swap   0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
/dev/sdb          
/dev/sdb1  ext4   0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sdc          
/dev/sdc1  ext4   0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sdd ```
1 Like

Post input and output, please.
(c) by @dglt :wink:
Use the </> button above the post entry box when pasting terminal output so it's formatted properly.

Zusammenfassung
~ >>> lsblk -la -o PATH,FSTYPE,PARTTYPE
PATH       FSTYPE PARTTYPE
/dev/sda          
/dev/sda2  ext4   0x83
/dev/sdb          
/dev/sdb1  btrfs  0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sdb2  btrfs  0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sdc          
/dev/sdc1  ext4   0x83
/dev/sdc2  ext4   0x83
/dev/sdc3  ext4   0x83
/dev/sdd          
/dev/sdd1  ext4   0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sdd2  ext4   0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sdd3  btrfs  0fc63daf-8483-4772-8e79-3d69d8477de4
/dev/sr0          
/dev/zram0  

Missing

@jjis2020 You can edit this post (pencil symbol)

System:
  Kernel: 5.2.11-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.2-x86_64 
  root=UUID=59d1d3fc-51dd-4635-a11f-0492e74f7846 rw quiet apparmor=1 
  security=apparmor resume=UUID=eef9205e-fb17-46cb-9837-5c94d15169ac 
  udev.log_priority=3 
  Desktop: Cinnamon 4.2.4 dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: MSI model: H81M-E35 (MS-7846) v: 3.0 serial: <filter> 
  UEFI: American Megatrends v: 18.4 date: 05/30/2014 
CPU:
  Topology: Dual Core model: Intel Celeron G1820 bits: 64 type: MCP 
  arch: Haswell family: 6 model-id: 3C (60) stepping: 3 microcode: 27 
  L2 cache: 2048 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 10803 
  Speed: 801 MHz min/max: 800/2700 MHz Core speeds (MHz): 1: 800 2: 800 
  Vulnerabilities: Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
  Type: mds mitigation: Clear CPU buffers; SMT disabled 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: disabled, RSB filling 
Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics 
  vendor: Micro-Star MSI driver: i915 v: kernel bus ID: 00:02.0 
  chip ID: 8086:0402 
  Display: x11 server: X.Org 1.20.5 driver: intel unloaded: modesetting 
  alternate: fbdev,vesa resolution: 1360x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel Haswell Desktop v: 4.5 Mesa 19.1.5 
  compat-v: 3.0 direct render: Yes 
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio 
  vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 00:03.0 
  chip ID: 8086:0c0c 
  Device-2: Intel 8 Series/C220 Series High Definition Audio 
  vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  chip ID: 8086:8c20 
  Device-3: Conexant Systems CX23887/8 PCIe Broadcast Audio and Video 
  Decoder with 3D Comb 
  vendor: Hauppauge works WinTV HVR-1250 driver: cx23885 v: 0.0.4 
  bus ID: 01:00.0 chip ID: 14f1:8880 
  Sound Server: ALSA v: k5.2.11-1-MANJARO 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Micro-Star MSI driver: r8169 v: kernel port: e000 bus ID: 02:00.0 
  chip ID: 10ec:8168 
  IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 4.95 TiB used: 373.16 GiB (7.4%) 
  ID-1: /dev/sda vendor: Kingston model: SA400S37120G size: 111.79 GiB 
  block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  serial: <filter> rev: 71E0 scheme: GPT 
  ID-2: /dev/sdb vendor: Western Digital model: WD3200AAKS-00L9A0 
  size: 298.09 GiB block size: physical: 512 B logical: 512 B 
  speed: 3.0 Gb/s serial: <filter> rev: 3E01 scheme: GPT 
  ID-3: /dev/sdc vendor: Western Digital model: WD40EZRZ-75GXCB0 
  size: 3.64 TiB block size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s 
  rotation: 5400 rpm serial: <filter> rev: 0A80 scheme: GPT 
  ID-4: /dev/sdd vendor: Western Digital model: WD1002FAEX-00Z3A0 
  size: 931.51 GiB block size: physical: 512 B logical: 512 B 
  speed: 3.0 Gb/s serial: <filter> rev: 1D05 scheme: MBR 
Partition:
  ID-1: / raw size: 102.69 GiB size: 100.58 GiB (97.94%) 
  used: 6.32 GiB (6.3%) fs: ext4 dev: /dev/sda2 
  ID-2: swap-1 size: 8.80 GiB used: 0 KiB (0.0%) fs: swap 
  swappiness: 60 (default) cache pressure: 100 (default) dev: /dev/sda3 
Sensors:
  System Temperatures: cpu: 39.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 179 Uptime: 2m Memory: 7.67 GiB used: 969.2 MiB (12.3%) 
  Init: systemd v: 242 Compilers: gcc: 9.1.0 Shell: bash v: 5.0.9 
  running in: gnome-terminal inxi: 3.0.36 
Drives:
Local Storage: total: 4.95 TiB used: 373.16 GiB (7.4%)
ID-1: /dev/sda vendor: Kingston model: SA400S37120G size: 111.79 GiB
block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
serial: rev: 71E0 scheme: GPT
ID-2: /dev/sdb vendor: Western Digital model: WD3200AAKS-00L9A0
size: 298.09 GiB block size: physical: 512 B logical: 512 B
speed: 3.0 Gb/s serial: rev: 3E01 scheme: GPT
ID-3: /dev/sdc vendor: Western Digital model: WD40EZRZ-75GXCB0
size: 3.64 TiB block size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
rotation: 5400 rpm serial: rev: 0A80 scheme: GPT
ID-4: /dev/sdd vendor: Western Digital model: WD1002FAEX-00Z3A0
size: 931.51 GiB block size: physical: 512 B logical: 512 B
speed: 3.0 Gb/s serial: rev: 1D05 scheme: MBR

Missing /dev/sdd in

lsblk -la -o PATH,FSTYPE,PARTTYPE

Which HDD/SSD give the error message?

/dev/sda1
/dev/sdb and /dev/sdc

Post

ls -la /dev/sdb
ls -la /dev/sdc
~ >>> ls -la /dev/sdb                                                                                                               
brw-rw---- 1 root disk 8, 16 21.09.2019 18:26 /dev/sdb
~ >>> ls -la /dev/sdc                                                                                                               
brw-rw---- 1 root disk 8, 32 21.09.2019 18:26 /dev/sdc

:expressionless: i now get pinged every time you post this. i permit you to post without it

1 Like

Of course, I just wanted to post it to you as an example once. :slight_smile:

2 Likes

You do not mention which kind of service you use for sharing.

Also - a better place for setting up a share is to use the /srv folder.

Depending on your chosen service - nfs or samba - you should create a folder structure in the /srv path as it makes administration easier

e.g. for samba

sudo mkdir -p /srv/smb/share1 /srv/smb/share2 /srv/smb/share3

or for nfs

sudo mkdir -p /srv/nfs/share1 /srv/nfs/share2 /srv/nfs/share3

To safeguard your system mount your devices in a separate structure and create bind mounts in /etc/fstab

e.g. mount structure

sudo mkdir -p /data/share1 /data/share2 /data/share3

Create regular mountpoints in /etc/fstab

UUID=your-uuid /data/share1 ext4 rw,noatime 0 0
UUID=your-uuid /data/share2 ext4 rw,noatime 0 0
UUID=your-uuid /data/share3 ext4 rw,noatime 0 0

And bind mounts for samba

/data/share1 /srv/smb/share1 none bind 0 0    
/data/share2 /srv/smb/share1 none bind 0 0
/data/share3 /srv/smb/share1 none bind 0 0

Mount

sudo mount -a

Set permissions

sudo chmod ugo+rws /data/share1 -R
sudo chmod ugo+rws /data/share2 -R
sudo chmod ugo+rws /data/share3 -R

https://wiki.archlinux.org/index.php/NFS
https://wiki.archlinux.org/index.php/samba

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by