Author Topic: Permission denied - Creating a share on second harddisk  (Read 3749 times)

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Permission denied - Creating a share on second harddisk
« on: March 16, 2014, 11:22:38 pm »
I have Mount a new Harddisk on my zentyal 3.3 Server.

In fstab I have following entry:
Code: [Select]
UUID="48f9011b-4ec5-4eb4-9b7c-567d8644b71a"     /HDD/SDB080_3TB ext4    errors=remount-ro,usrquota,grpquota,acl,user_xattr      0       1
I have create a main share called "SDB080_3TB" on "/HDD/SDB080_3TB" - It works and can be create.

Now I want to create a new Folder "DomainFiles" on this HDD and share them with the sharename "DomainFiles" - but the don´t work. The error is

Code: [Select]
Zentyal could not access to directory '/HDD/SDB080_3TB/DomainFiles': Permission denied
What can I do to fix the Problem? What are the right permissions and owner of subdirectories to manage via Zentyal.
« Last Edit: March 16, 2014, 11:24:16 pm by MyKey0815 »

ttssaaooo

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #1 on: March 17, 2014, 09:39:43 am »
Very interesting post on

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #2 on: March 17, 2014, 05:02:39 pm »
OK - I have spend time to investigate the Problem

I think via the UI of zentyal is it not possible to create Shares on subdirectories if a parent is shared.

I test it follwing:

I Create /media/Folder1 and /media/Folder1/Folder2. Then I create a Share on "Folder1". The I try to make a second share on "Folder2". That´s no possible. Zentyal say "Permission denied".

How can that be Workaround - I Need some root Shares to administrate some applications and want to copy files direkt to Folder-structure.

This behavior still exists in Zentyal 3.4 :-(
« Last Edit: March 17, 2014, 05:04:37 pm by MyKey0815 »

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #3 on: March 17, 2014, 07:29:46 pm »
How can that be Workaround - I Need some root Shares to administrate some applications and want to copy files direkt to Folder-structure.

I would share (only) the top level folder and set the access rights on folder level. For your example: Group_A and Group_B have access to Folder1. Only Group_B has rights to access Folder2. 
Udo

julio

  • Guest
Re: Permission denied - Creating a share on second harddisk
« Reply #4 on: March 17, 2014, 11:58:03 pm »
I have Mount a new Harddisk on my zentyal 3.3 Server.

In fstab I have following entry:
Code: [Select]
UUID="48f9011b-4ec5-4eb4-9b7c-567d8644b71a"     /HDD/SDB080_3TB ext4    errors=remount-ro,usrquota,grpquota,acl,user_xattr      0       1
I have create a main share called "SDB080_3TB" on "/HDD/SDB080_3TB" - It works and can be create.

Now I want to create a new Folder "DomainFiles" on this HDD and share them with the sharename "DomainFiles" - but the don´t work. The error is

Code: [Select]
Zentyal could not access to directory '/HDD/SDB080_3TB/DomainFiles': Permission denied
What can I do to fix the Problem? What are the right permissions and owner of subdirectories to manage via Zentyal.

try with:
Code: [Select]
sudo chown root:Administrators /HDD/SDB080_3TB/DomainFiles
sudo chmod 770 /HDD/SDB080_3TB/DomainFiles
« Last Edit: March 18, 2014, 12:09:40 am by Julio »

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #5 on: March 18, 2014, 06:47:20 am »
try with:
Code: [Select]
sudo chown root:Administrators /HDD/SDB080_3TB/DomainFiles
sudo chmod 770 /HDD/SDB080_3TB/DomainFiles

Thank you very much. I tried but the same result: "Permission denied". I can´t understand why no one have found this "bug"?

Is it possible to manage the Shares directly. I think that will be a Workaround for me

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #6 on: March 18, 2014, 06:49:31 am »
I would share (only) the top level folder and set the access rights on folder level. For your example: Group_A and Group_B have access to Folder1. Only Group_B has rights to access Folder2.

I have a webapplication that Need two Shares: One as toplevel and one  for users area. But for all other purpose I can do that. Thanks

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #7 on: March 18, 2014, 10:33:23 am »
Hello:

Could you please show with which options is that second disk mounted?

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #8 on: March 18, 2014, 12:03:43 pm »
Hello:

Could you please show with which options is that second disk mounted?

In /etc/fstab is following command:
Code: [Select]
UUID="48f9011b-4ec5-4eb4-9b7c-567d8644b71a"     /HDD/SDB080_3TB ext4    errors=remount-ro,usrquota,grpquota,acl,user_xattr      0       1

julio

  • Guest
Re: Permission denied - Creating a share on second harddisk
« Reply #9 on: March 18, 2014, 12:17:45 pm »
try with:
Code: [Select]
sudo chown root:Administrators /HDD/SDB080_3TB/DomainFiles
sudo chmod 770 /HDD/SDB080_3TB/DomainFiles

Thank you very much. I tried but the same result: "Permission denied". I can´t understand why no one have found this "bug"?

Is it possible to manage the Shares directly. I think that will be a Workaround for me

very intresting, me works!

please try with:
Code: [Select]
sudo chown root:Administrator /HDD/SDB080_3TB/DomainFiles
sudo chmod 770  /HDD/SDB080_3TB/DomainFiles
sudo setfacl -b /HDD/SDB080_3TB/DomainFiles

please send me the results of folowing commands:
Code: [Select]
cat /proc/mounts
cat /proc/filesystems
« Last Edit: March 18, 2014, 12:40:36 pm by Julio »

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #10 on: March 18, 2014, 12:37:41 pm »
please send me the results of folowing commands:
Code: [Select]
cat /proc/mounts
cat /proc/filesystems

Code: [Select]
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=8036044k,nr_inodes=2009011,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=1615880k,mode=755 0 0
/dev/mapper/szx020080--vg-root / ext4 rw,relatime,quota,usrquota,grpquota,errors=remount-ro,data=ordered 0 0
none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=51200k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755 0 0
none /sys/fs/pstore pstore rw,relatime 0 0
/dev/sda1 /boot ext2 rw,relatime,errors=continue,user_xattr,acl 0 0
/dev/sdb1 /HDD/SDB080_3TB ext4 rw,relatime,quota,usrquota,grpquota,errors=remount-ro,data=ordered 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,name=systemd 0 0

Code: [Select]
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cpuset
nodev   tmpfs
nodev   devtmpfs
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   pipefs
nodev   anon_inodefs
nodev   devpts
        ext3
        ext4
nodev   ramfs
nodev   hugetlbfs
        vfat
nodev   ecryptfs
        fuseblk
nodev   fuse
nodev   fusectl
nodev   pstore
nodev   mqueue
        ext2

If I "chown" with "ebox:ebox" on the "/HDD/SDB080_3TB" then I can create a new subshare one time. If I want create a second sub share the permission denied come again and I must "chown ebox:ebox" again

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #11 on: March 18, 2014, 12:46:23 pm »
try with:
Code: [Select]
sudo chown root:Administrators /HDD/SDB080_3TB/DomainFiles
sudo chmod 770 /HDD/SDB080_3TB/DomainFiles

Not able to create the share - permission denied

julio

  • Guest
Re: Permission denied - Creating a share on second harddisk
« Reply #12 on: March 18, 2014, 12:47:23 pm »
okay than "ebox:ebox"
you can use this for create new Directorys then in GUI create Share:
Code: [Select]
sudo mkdir | sudo chown ebox | sudo chgrp ebox /HDD/SDB080_3TB/Folder1
sudo mkdir | sudo chown ebox | sudo chgrp ebox /HDD/SDB080_3TB/Folder2
sudo mkdir | sudo chown ebox | sudo chgrp ebox /HDD/SDB080_3TB/Folderx
« Last Edit: March 18, 2014, 12:51:29 pm by Julio »

MyKey0815

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +2/-0
    • View Profile
Re: Permission denied - Creating a share on second harddisk
« Reply #13 on: March 18, 2014, 12:56:36 pm »
okay than "ebox:ebox"
you can use this for create new Directorys then in GUI create Share:
Code: [Select]
sudo mkdir | sudo chown ebox | sudo chgrp ebox /HDD/SDB080_3TB/Folder1
sudo mkdir | sudo chown ebox | sudo chgrp ebox /HDD/SDB080_3TB/Folder2
sudo mkdir | sudo chown ebox | sudo chgrp ebox /HDD/SDB080_3TB/Folderx

It only works if i reset the Main-Share (/HDD/SDB080_3TB) - then is it posible to set subshare on a subfolder. Is it a Problem with my permissions if i every time i set the chown ebox:ebox?

julio

  • Guest
Re: Permission denied - Creating a share on second harddisk
« Reply #14 on: March 18, 2014, 01:09:20 pm »
for existing Directorys use this before Sharing:

Code: [Select]
sudo chown ebox:ebox /HDD/SDB080_3TB/DomainFilesx
sudo chmod 770 /HDD/SDB080_3TB/DomainFilesx
« Last Edit: March 18, 2014, 01:11:17 pm by Julio »