WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can't change folder/file ownership  (Read 1550 times)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Can't change folder/file ownership
« on: May 13, 2018, 07:57:59 PM »
Hi all,

I have an odd little problem.

I'm using mc 9.0

tce is located on a flash drive /mnt/sdb1/tce

Flash drive was formated on windows 7 pro x86 system to fat32

I've just noticed that my /mnt/sdb1/tce folder and ALL sub folder's and files are owned by root:root
Code: [Select]
sudo chown -R tc:staff /mnt/sdb1/tcereturns
Code: [Select]
chown: tce/optional/nano.tcz.dep: Operation not permitted
chown: tce/optional/ncurses5.tcz.md5.txt: Operation not permitted
chown: tce/optional/ncurses5.tcz: Operation not permitted
chown: tce/optional/nano.tcz.md5.txt: Operation not permitted
chown: tce/optional/nano.tcz: Operation not permitted
chown: tce/optional/ntpclient.tcz.md5.txt: Operation not permitted
chown: tce/optional/ntpclient.tcz: Operation not permitted
chown: tce/optional/openssh.tcz.dep: Operation not permitted
chown: tce/optional/libedit.tcz.dep: Operation not permitted
chown: tce/optional/openssl.tcz.md5.txt: Operation not permitted
chown: tce/optional/openssl.tcz: Operation not permitted
chown: tce/optional/ncursesw.tcz.md5.txt: Operation not permitted
chown: tce/optional/ncursesw.tcz: Operation not permitted
chown: tce/optional/libedit.tcz.md5.txt: Operation not permitted
chown: tce/optional/libedit.tcz: Operation not permitted
chown: tce/optional/openssh.tcz.md5.txt: Operation not permitted
chown: tce/optional/openssh.tcz: Operation not permitted
chown: tce/optional/samba3.tcz.dep: Operation not permitted
chown: tce/optional/libcups.tcz.dep: Operation not permitted
chown: tce/optional/libavahi.tcz.dep: Operation not permitted
chown: tce/optional/dbus.tcz.dep: Operation not permitted
chown: tce/optional/glib2.tcz.dep: Operation not permitted
chown: tce/optional/acl.tcz.dep: Operation not permitted
chown: tce/optional/attr.tcz.md5.txt: Operation not permitted
chown: tce/optional/attr.tcz: Operation not permitted
chown: tce/optional/acl.tcz.md5.txt: Operation not permitted
chown: tce/optional/acl.tcz: Operation not permitted
chown: tce/optional/popt.tcz.md5.txt: Operation not permitted
chown: tce/optional/popt.tcz: Operation not permitted
chown: tce/optional/libffi.tcz.md5.txt: Operation not permitted
chown: tce/optional/libffi.tcz: Operation not permitted
chown: tce/optional/glib2.tcz.md5.txt: Operation not permitted
chown: tce/optional/glib2.tcz: Operation not permitted
chown: tce/optional/gcc_libs.tcz.md5.txt: Operation not permitted
chown: tce/optional/gcc_libs.tcz: Operation not permitted
chown: tce/optional/expat2.tcz.md5.txt: Operation not permitted
chown: tce/optional/expat2.tcz: Operation not permitted
chown: tce/optional/dbus.tcz.md5.txt: Operation not permitted
chown: tce/optional/dbus.tcz: Operation not permitted
chown: tce/optional/libavahi.tcz.md5.txt: Operation not permitted
chown: tce/optional/libavahi.tcz: Operation not permitted
chown: tce/optional/libcups.tcz.md5.txt: Operation not permitted
chown: tce/optional/libcups.tcz: Operation not permitted
chown: tce/optional/samba3-libs.tcz.md5.txt: Operation not permitted
chown: tce/optional/samba3-libs.tcz: Operation not permitted
chown: tce/optional/samba3.tcz.md5.txt: Operation not permitted
chown: tce/optional/samba3.tcz: Operation not permitted
chown: tce/optional: Operation not permitted
chown: tce/optional: Operation not permitted
chown: tce/mydata.tgz: Operation not permitted
chown: tce/onboot.lst: Operation not permitted
chown: tce/ondemand: Operation not permitted
chown: tce/ondemand: Operation not permitted
chown: tce/: Operation not permitted
chown: tce/: Operation not permitted

I've also just noticed that any file i create on /mnt/sdb1 will be owned by root:root

for example
Code: [Select]
tc@afstest:/mnt/sdb1$ ls -hal
total 12
drwxrwxrwx    4 root     root        4.0K May 14 12:51 ./
drwxrwxr-x    7 root     staff        140 May 14 12:06 ../
drwxrwxrwx    7 root     root        4.0K May 11 15:45 shares/
drwxrwxrwx    4 root     root        4.0K May 11 15:19 tce/
tc@afstest:/mnt/sdb1$ whoami
tc
tc@afstest:/mnt/sdb1$ touch test
tc@afstest:/mnt/sdb1$ echo hello world > test
tc@afstest:/mnt/sdb1$ cat test
hello world
tc@afstest:/mnt/sdb1$ ls -hal
total 16
drwxrwxrwx    4 root     root        4.0K May 14 12:53 ./
drwxrwxr-x    7 root     staff        140 May 14 12:06 ../
drwxrwxrwx    7 root     root        4.0K May 11 15:45 shares/
drwxrwxrwx    4 root     root        4.0K May 11 15:19 tce/
-rwxrwxrwx    1 root     root          12 May 14 12:53 test

tc@afstest:/mnt/sdb1$ chown tc.staff test
chown: test: Operation not permitted
tc@afstest:/mnt/sdb1$ sudo chown tc.staff test
chown: test: Operation not permitted


I don't recall seeing this behaviour before, any suggestions to change ownerships to standard would be a great help.

I have a bunch of folders in the /mnt/sdb1/shares folder that need specific permissions to work with samba, but I can't change em.
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Can't change folder/file ownership
« Reply #1 on: May 13, 2018, 08:12:09 PM »
Hi remus
I don't think fat32 supports file ownership or permissions. You might be able to set the ownership of the entire drive either
through a mount parameter or through the mount point itself.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Can't change folder/file ownership
« Reply #2 on: May 13, 2018, 08:14:46 PM »
Thanks Rich,

I'll format the flash drive as ext3 and try again
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Can't change folder/file ownership
« Reply #3 on: May 13, 2018, 08:40:49 PM »
Hi remus
You're welcome. By the way, unless you need a Windows machine to directly access the drive, there's no reason to format
VFAT or NTFS. I'm guessing this is a Samba server. Computers reading from and writing to the server transfer the data via
the network and are oblivious to how the drive is formatted.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Can't change folder/file ownership
« Reply #4 on: May 13, 2018, 09:21:55 PM »
Hi Rich,

You were right.

Since making flash drive ext3 and copying back tce folder to it.

Permissions / ownership is as it should be. And attempts to alter them work as they should.

This is a test samba server... I'm using an existing windows machine, thus the tce on a flash drive + mc boot cd.

I've been using mc 3.8.4 for years. Am upgrading to provide support for a macbook pro to be able to access password protected shares on a samba server.

Apparently this has to do with smb support. "I think" mc 3.8.4 kernel had support for smb 1. This does not allow for an up to date macbook pro to authenticate a password protected server.

I did try copying the samba3 tcz + dependencies I aquired from mc 9 to my mc 3.8.4 tce/optional dir and got some weird errors.

So am cranking myself through upgrade growing pains.


Live long and prosper.