Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Changing ownership problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
HungGarTiger
Apprentice
Apprentice


Joined: 04 Feb 2014
Posts: 180
Location: /nz/auckland

PostPosted: Sat Jun 05, 2021 8:02 am    Post subject: [Solved] Changing ownership problems Reply with quote

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sat Jun 05, 2021 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message
HungGarTiger
Apprentice
Apprentice


Joined: 04 Feb 2014
Posts: 180
Location: /nz/auckland

PostPosted: Sun Jun 06, 2021 2:28 am    Post subject: Reply with quote

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
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2963
Location: Edge of marsh USA

PostPosted: Sun Jun 06, 2021 3:16 am    Post subject: Reply with quote

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jun 06, 2021 10:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sun Jun 06, 2021 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2963
Location: Edge of marsh USA

PostPosted: Sun Jun 06, 2021 4:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum