You are not logged in.
So I have an HDD with data in it and I used windows to shrink it's partition so I can make a new ext4 one (to copy the files from the NTFS partition to the ext4 one). Got on Linux and I run:
$ sudo cfdisk /dev/sdd
$ sudo mkfs.ext4 /dev/sdd3With cfdisk /dev/sdd command I made the new partition and make it Linux filesystem, then formatted it to ext4 using the second command. Sounds good to me.
When I open the new partition with Dolphin file manager I need root priviledges to write/read files. I just went like it and mounted with Dolphin all the first and the second partition (Note that I inputted "/dev/sdd3" because the partitions are actually 3: One is Microsoft reserved, the second is Microsoft data, the NTFS partition and the third is the Linux one, when I say the first and the second partition I actually mean the NTFS partition and the ext4 partition) and I started to copy the files with Dolphin. I stopped tho because every like two minutes of copying data, it kept prompting me the box to imput the password and the RAM was maxed out along with the swap (wich should be normal if it was copying files but... All it was doing was just copying folders, tell me if I'm wrong but I saw that as a red flag since I have 8GB of RAM and... ~6GB of RAM + 4GB of swap filled with directories is... Not normal to me).
I wish to fix this "needing to have root priviledges" to read and write in the ext4 partition so that users can just read and write to it. (Also, bonus: Is it just safe to remove the sdd1 partition since I don't think I'll ever use this HDD on a windows machine?)
Did I mess something up? Thanks in advance.
Offline
This is normal. Where did you mount it? ls -l the mount point to see the permissions.
Offline
1) save to kill a "M$ reserved": yes!
according to wikipedia the idea behind it is some weird technique to emulate the post-mbr gap from mbr/legacy days - although I don't know any softwarevthat ever made use of it
2) permissions
well - a fresh filesystem only has its root directory with nothing in it - and as one usually needs root to mount without special mount options the mount ends up as owned by root ith default permissions of 755
so either give mount options like uid and gid to mount it as your user - or create a folder and chown to your user
3) performance
no idea but sounds not intented
Last edited by cryptearth (2024-07-23 18:55:52)
Offline
Oh... So I need to change permissions? I didn't know about that since when I installed the system it didn't ask for me to change the permissions... Well, I'll do that then. Thanks
Offline
well, yea, because when you create a new user and have thier home directory created the command changes the permissions accordingly
as said: on a basic linux usually the default permission is 0755: read/write/execute for the owner, read/execute for the group, read/execute for anybody else - with the owner and group of everything being root:root
when you first install a fresh system quite a lot of system users and groups get created for several purposes - with the first proper user being uid:gid of 1000:1000
so if you want to write to something, you either need
- to be the owner of a folder or a file and have at least write permission for the owner
- belong to a group set for the file or folder and have write permission set for the group
- be elevated aka root who has unrestricted permission to everything
a possible way is to use sudo to change permissions and/or owner of the mountpoint
another option is to give the options uid and gid to the mount command which performs the mount with the given user and group
you can also set the user option in fstab
there're several ways to get it done - but unless you do anything a fresh filesystem will always get mounted to its mountpoint with root as owner and group and default 755 permissions - hence your regular user gets asked for elevation - although I don't understand why this is kept re-evaluated as usually you only have to provide the credentials once at the start - and also a simple copy shouldn't hog your system resources
Offline