Change ownership of HDD

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Change ownership of HDD

Postby redschuhart » Jan 30th, '24, 13:38

I have Mageia 9 installed on an SSD. I have the system set up for dual boot with Windows 10 which is installed on a second SSD. I use Mageia as my default.
I also have three additional HDDs attached. One for personal file storage, another for graphics/images storage and the third for backup.
These three HDDs are all formatted NTFS. I've edited fstab to auto mount them at boot in /media/username/HDD name, no problem. Example- UUID=6AF440D107179B55 /media/username/Arc ntfs-3g defaults,umask=000 0 0
I can access/open files.
What I am unable to do is take ownership of the various and many files/folders on these drives. Not the drive or mount points just the folders and files so I can edit/add as necessary. Every time I try I get an "access denied" error in Dolphin. If I copy/move to one of these HDDs/folders I get the access denied message yet the copy/move has been done when I check(?)
I've tried chown, chmod, yet all the files and folders remain as owned by root.
I've added myself to the root group with no effect.
I am, if absolutely necessary, prepared to copy the contents of each HDD to external drives then re-format the three in question as ext4 and copy/move everything back if that would make a difference. But it would be a long process due to the amount of data to be moved and would rather avoid doing it unless it's the only way.
Would changing the mount point help?
Or is there something so obvious I can't see it?
Any help would be appreciated so I can continue using Linux as my main OS.
redschuhart
 
Posts: 4
Joined: Jan 30th, '24, 13:09

Re: Change ownership of HDD

Postby doktor5000 » Jan 30th, '24, 19:35

Can you please post the output of
Code: Select all
ls -al /media/username/Arc

You can omit files/folder names and such for privacy but at least leave one file/folder in the listing to check the permissions.

From what I remember you have to run chown for your user once on the mountpoint for write access when it is mounted - which is a difference compared to previous releases.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18073
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Change ownership of HDD

Postby benmc » Jan 30th, '24, 20:09

redschuhart wrote:These three HDDs are all formatted NTFS.


I understand that NTFS does not respect unix-like permissions, so that is one part of the puzzle.
the second part is likely Windows itself.
It may not have shut down, rather "fast shutdown", which is akin to hibernating. If so, it has not released the drives and content thereof, and Linux, respecting the state of the drive, has reported it as read only.
You may have to get into the Windows and change the away it shuts down to truly shutting down, so that it releases the partitions.
benmc
 
Posts: 1218
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Change ownership of HDD

Postby doktor5000 » Jan 30th, '24, 21:09

benmc wrote:I understand that NTFS does not respect unix-like permissions, so that is one part of the puzzle.

That's only partially correct. NTFS does support several namespaces, one being POSIX. Read e.g. https://github.com/tuxera/ntfs-3g/wiki/ ... -FAQ#usage
WHY DOES THE DRIVER ALLOW CASE SENSITIVE FILENAMES? OR WHY DOES THE DRIVER ALLOW SPECIAL CHARACTERS IN THE FILENAMES?
NTFS supports several filename namespaces at the same time: DOS, Win32 and POSIX. While the NTFS-3G driver handles all of them, it always creates new files in the POSIX namespace for maximum portability and interoperability reasons. This means that filenames are case sensitive and all characters are allowed except ‘/’ and ‘\0’.
As Windows uses more restrictive naming rules, you can prevent ntfs-3g from creating new files which do not meet Windows file naming rules by mounting with the option windows_names.

When mounting with the lowntfs-3g variant, you can get case insensitive access to files by using the option ignore_case. Doing so, all files will be shown with lower case letters in directory listings.


Although the other part about fast shutdown might be true - this can usually easily be check via ntfs-3g.probe -w on the NTFS filesystem device, it will report whether it can be mounted read-write or not.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18073
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Change ownership of HDD

Postby redschuhart » Jan 31st, '24, 20:44

Hi everyone, many thanks for your replies and time.
I've tried so many options that I'd got to the point of not being clear what I did when.
I was making changes to just one drive of the three till I could get a definite resolution.
In the end I booted into Windows copied the files from this drive to a completely different one and swapped them over.
I'm now back to where I was at the very start. Copying/moving to the drive still produces the "Access Denied" message but the copy/move has taken place when close then re-open Dolphin.
I think it very likely I was trying to fix an issue with permissions that didn't exist.
I'll live with the false error message till I can hopefully resolve it.
Thanks again for your taking the time to help.
redschuhart
 
Posts: 4
Joined: Jan 30th, '24, 13:09

Re: Change ownership of HDD

Postby doktor5000 » Feb 1st, '24, 01:37

Well the problem will probably not fix itself ...
doktor5000 wrote:Can you please post the output of
Code: Select all
ls -al /media/username/Arc

You can omit files/folder names and such for privacy but at least leave one file/folder in the listing to check the permissions.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18073
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Change ownership of HDD

Postby redschuhart » Feb 1st, '24, 16:32

OK I have found the issue. The wording of the Plasma error message "access denied" read, to me, as though this was a permissions issue.
I found the answer on an Arch Linux forum- add 'noatime' to the fstab entry.
I did this and no more errors.
redschuhart
 
Posts: 4
Joined: Jan 30th, '24, 13:09

Re: Change ownership of HDD

Postby redschuhart » Feb 1st, '24, 16:44

doktor5000 wrote:Well the problem will probably not fix itself ...
doktor5000 wrote:Can you please post the output of
Code: Select all
ls -al /media/username/Arc

You can omit files/folder names and such for privacy but at least leave one file/folder in the listing to check the permissions.


Hi
Thanks for your reply. I was going to update with the info but have had other things to do.
Your suggestion confirmed that I had read/write permissions already, all the files were drwxrwxrwx. But I was still getting the error 'Access Denied' when moving/copying.
The issue is, in my case, fixed by adding 'noatime' to the fstab entry after 'defaults'.
I do appreciate your help and time, many thanks.
redschuhart
 
Posts: 4
Joined: Jan 30th, '24, 13:09

Re: Change ownership of HDD

Postby Germ » Feb 1st, '24, 17:16

If you are good now, could you edit your first post and add [SOLVED] to the start of the topic title?

Thanks :mrgreen:
Starting in 1999: Mandrake > Mandriva > Mageia
Linux User #274693
User avatar
Germ
 
Posts: 725
Joined: Mar 30th, '11, 13:16
Location: Chelsea, Oklahoma USA


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron