View previous topic :: View next topic |
Author |
Message |
HungGarTiger Apprentice
Joined: 04 Feb 2014 Posts: 180 Location: /nz/auckland
|
Posted: Sat Jun 05, 2021 8:02 am Post subject: [Solved] Changing ownership problems |
|
|
I have a storage drive that I'm mounting with fstab. It's permissions are root root and I'm trying to change them user user, however chown isn't doing the job it seems. Using the verbose option it claims to be changing the ownership but when I list after the command completes nothing has changed.
/etc/fstab
Code: | UUID=9517-0B47 /boot/efi vfat defaults,noatime 1 2
UUID=81ff556d-6077-4960-a618-51996f63c67f none swap sw 0 0
UUID=d0ed1e7c-391e-4b66-9786-7b33e7513cea / ext4 noatime 0 1
/dev/sdc1 /home/aled/Storage-fs ntfs noatime 0 2
|
The command I've been running from 'su' is
Code: | # chown --verbose aled:aled /home/aled/Storage-fs/
changed ownership of '/home/aled/Storage-fs/' from root:root to aled:aled |
Here is stat
Code: | # stat /home/aled/Storage-fs
File: /home/aled/Storage-fs
Size: 4096 Blocks: 128 IO Block: 4096 directory
Device: 821h/2081d Inode: 5 Links: 1
Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-06-03 16:28:56.392337800 +1200
Modify: 2021-05-16 15:51:21.551225700 +1200
Change: 2021-05-16 15:51:21.551225700 +1200
Birth: - |
And it still looks like this
Code: | drwxrwxrwx 1 root root 4096 May 16 15:51 Storage-fs
|
This has me kinda stumped
Last edited by HungGarTiger on Sun Jun 06, 2021 2:29 am; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sat Jun 05, 2021 8:53 am Post subject: |
|
|
Hi
maybe emerge ntfs3g since ntfs has vary limited functionality.
Then modify fstab
Code: |
/dev/sdc1 /home/aled/Storage-fs ntfs-3g noatime,uid=1000,gid=1000 0 2
|
Please try also this
Code: |
umount /dev/sdc1
chown aled. /home/aled/Storage-fs
mount /dev/sdc1
#chown -R aled. /home/aled/Storage-fs
|
Are you using this partition in Windows also? _________________
|
|
Back to top |
|
|
HungGarTiger Apprentice
Joined: 04 Feb 2014 Posts: 180 Location: /nz/auckland
|
Posted: Sun Jun 06, 2021 2:28 am Post subject: |
|
|
These steps seems to have done the job.
Yes, I plan on using this partition in my Windows 10 too. Windows 10 is also installed on a separate drive |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Sun Jun 06, 2021 3:16 am Post subject: |
|
|
alamahant wrote: | Code: | chown aled. /home/aled/Storage-fs |
|
In "chown aled." what is the dot for? Is that the same as doing "chown aled.aled" and if so, why not : instead of . (according to the manual)? _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Jun 06, 2021 10:26 am Post subject: |
|
|
Code: |
In "chown aled." what is the dot for? Is that the same as doing "chown aled.aled" and if so, why not : instead of . (according to the manual)?
|
chown aled.
is shorthand for
chown aled:aled
It just saves you from typing. _________________
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21633
|
Posted: Sun Jun 06, 2021 4:20 pm Post subject: |
|
|
info chown: | OWNER‘:’
If a colon but no group name follows OWNER, that user is made the
owner of the files and the group of the files is changed to OWNER’s
login group. |
info chown: | Some older scripts may still use ‘.’ in place of the ‘:’ separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU ‘chown’ supports
‘.’ so long as no ambiguity results. New scripts should avoid the use
of ‘.’ because it is not portable, and because it has undesirable
results if the entire OWNER‘.’GROUP happens to identify a user whose
name contains ‘.’. | From that, I would say that aled. is not necessarily short for aled:aled; rather, it is short for aled:$login_group_of_aled, which may or may not be the group aled. Additionally, per that second note, : is preferred over ., though both currently produce the same result when . is unambiguous. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Sun Jun 06, 2021 4:34 pm Post subject: |
|
|
I've been trying to convert friends to the : for many years. I admit that dot/period (.) Is easier to type on most keyboards. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
|