Author Topic: Changing ownership  (Read 2522 times)

ZAJDAN

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Changing ownership
« on: May 26, 2015, 01:48:00 pm »
Hello,
I have this problem:
in zentyal web interface I have add in File Sharing Directory under Zentyal ...name'test' (will automatically create the share.directory in /home/samba/shares)
in terminal under root I can look at the directory:
Code: [Select]
drwxrwx---+ 3 administrator adm           4096 May 26 13:28 testand as we see the directory which was made by the zentyal webInterface get owner administrator and group adm and in my case windows user can prettily use it

next in zentyal web interface I have add in File Sharing Directory under Zentyal ...name 'DATA' (will automatically create the share.directory in /home/samba/shares)
and into this folder I mount network folder from other linux machine:
Code: [Select]
root@er-server:/home/supervisor# sshfs supervisor@192.168.1.1:/media/supervisor/My\ Book/DATA /home/samba/shares/DATAthen I look at permissions:
Code: [Select]
drwx------  1 supervisor    supervisor   16384 Apr 23 14:50 DATA
I have got idea, that I will change owner, but:
Code: [Select]
root@er-server:/home/supervisor# chown administrator /home/samba/shares/DATA
chown: changing ownership of ‘/home/samba/shares/DATA’: Permission denied
and as You see I am root!


and with this directory 'DATA' I have a problem....users can't access





« Last Edit: May 26, 2015, 02:11:44 pm by ZAJDAN »

expertgeeks

  • Forum Moderator
  • Zen Warrior
  • *****
  • Posts: 124
  • Karma: +11/-0
    • View Profile
Re: Changing ownership
« Reply #1 on: May 26, 2015, 10:08:20 pm »
Actually I just noticed that you have no group permissions set after you chown the folder to supervisor, I think this is why you're having issues. As root;

Code: [Select]
chmod g+rwx /home/samba/shares/DATATo set group read/write/execute permissions on the folder
Code: [Select]
chmod -R g+rwx /home/samba/shares/DATAif you need to change the permissions on the contents of DATA too.

Make sure you set the group properly on the folder.
Code: [Select]
chown administrator:adm /home/samba/shares/DATAor
Code: [Select]
chown -R administrator:adm /home/samba/shares/DATAif you need to change the permissions on the contents of DATA too.

ZAJDAN

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Changing ownership
« Reply #2 on: May 27, 2015, 09:41:21 am »
Hello,
thank You for help
in a moment when I run:
Code: [Select]
root@erka-server:/home/supervisor# chown  administrator:adm /home/samba/shares/DATA
chown: changing ownership of ‘/home/samba/shares/DATA’: Permission denied

even though I am root

in same way I mount the network folder in debian and there is not problem
« Last Edit: May 27, 2015, 10:07:53 am by ZAJDAN »

ZAJDAN

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Changing ownership
« Reply #3 on: May 27, 2015, 01:20:28 pm »
now I found where is one problem!
sshfs need option -o allow_other

expertgeeks

  • Forum Moderator
  • Zen Warrior
  • *****
  • Posts: 124
  • Karma: +11/-0
    • View Profile
Re: Changing ownership
« Reply #4 on: May 30, 2015, 07:38:20 pm »
Glad you got it sorted.

So the share was mounted by someone other than root ?