I recently used KDE Partition Manager to reformat a HDD from ntfs to ext4. After formatting the HDD I remounted it back to my media folder. However I cannot write or move any files into it. What did I do wrong? Can anyone help me out?
What permissions and ownership does the mountpoint have? If you want it mounted at
/media ─ which is a root-level directory and which as such is not normally intended to be written to by users ─ then the directory itself will normally be owned by
root:root and the permissions would typically be something like
drwxr-xr-x. That means that it's only writable to the root account.
So, if you want to stick with that mountpoint and you want to be able to write to it, then I would advise you to change the ownership of
squitwert:squitwert ─ or whatever your local user name is ─ or else change the ownership to
root:squitwert and the permissions to
For the first possibility...
sudo chown squitwert:squitwert /media
For the second possibility...
sudo chown root:squitwert /media && sudo chmod 775 /media
I have it mounted to
I tried the first command and nothing changed. I tried the second command and I got
sudo chown root:wired /media $$ sudo chmod 775 /Media/Ent chown: cannot access '/media': No such file or directory chown: cannot access '40473': No such file or directory chown: cannot access 'sudo': No such file or directory chown: cannot access 'chmod': No such file or directory chown: cannot access '775': No such file or directory
First of all, this...
... tells me that you did not issue the command as I have told you to issue it. You substituted the double ampersand ("&&") between the two commands for dollar signs ("$$").
Secondly, You didn't say that it was mounted at
/media/Ent, you said that it was mounted at
/media There's a difference.
So let's try this again. Issue this () command, assuming that
wired is the name of your user ─ if it isn't, substitute it for your user's actual name...:
sudo chown -R root:wired /media/Ent && sudo chmod -R 775 /media/Ent
P.S.: It would have been a lot easier if you had chosen to mount it under your
$HOME directory somewhere. In a UNIX system, the users are only supposed to have write access to their own
$HOME, as well as to
My bad man, I am new to all this. I ran the command
[wired@BigBertha ~]$ sudo chown -R root:wired /Media/Ent && sudo chmod -R 775 /Media/Ent
It went through but I cannot write to it. Should I try rebooting to see if that fixes it? Is there some sort of way I can remount them in my $HOME directory?
If you supplied the command as you've pasted it here, then it will of course not have worked, because now all of a sudden you are referring to
/Media/Ent instead of to
/media/Ent. GNU/Linux is case-sensitive.
Yes, of course, and given that you are treating this as a single-user system, that would be the preferred option.
First of all, you'd need to unmount the filesystem from
/media/Ent. Then you must create a directory in your
$HOME ─ e.g.
/home/wired/data ─ and mount it there. And if you want the same result after rebooting, then you're going to have to add a record for this filesystem in
Let's suppose that this secondary HDD has one partition on it, and that it is
/dev/sdb1 ─ change this to the correct partition if needed.
/etc/fstab as follows...
sudo nano /etc/fstab
Add a line for the filesystem like this...
/dev/sdb1 /home/wired/data ext4 defaults 0 0
Save the file by pressing Ctrl+O and exit the editor with Ctrl+X. This will make sure that the mount will persist across reboots.
I added the line
I also reformatted seeing if I could fix it somehow that way and I still can't write to my HDD. It seems I don't have the permissions to write to it. Any way you know how to fix this?
First of all, there's another typo in there. There's a double zero at the end of your last line.
Secondly, are you sure that
/dev/sdb1 is the correct partition?
Try taking the ownership of the mount point and see if it will work:
sudo chown wired:wired /home/wired/data
I fixed the typo and still nothing has changed. Also yes sdb1 is the correct one
I tried your command before you deleted it. I got this message:
chown: cannot access '/home/wired/data': No such file or director
Did you create a directory named
Also a / is missing at the beginning of the line you add to fstab. Better to use its UUID.
Please post the terminal output as text formatted by clicking the </> button and not screenshot.
According to your screenshot, your partition is now mounted at
I told you to create that directory first.
Okay, do this...
mkdir ~/data sudo umount /dev/sdb1 sudo mount /dev/sdb1 /home/wired/data
I want to apologize for being a moron no I didn't but I did was Aragon told me then I went back and ran the command you told me to run
sudo chown wired:wired /home/wired/data and that fixed it! Thank you for bearing with me!
Thank you for helping me step by step I did what you said and what Marte said. Thank you for bearing me with me! Truly a life saver!
Actually, no. Not to brag, but there was no mountpoint
/home/wired/data yet until I told you to create one, and in creating that directory, it would automatically beget yourself as owner, given that you were creating it as yourself, and in your home directory. By consequence, that
chown command had no effect.
The two commands I gave you below the one that created the mountpoint then made sure that your partition was mounted in the right place, because it wasn't ─ see your last screenshot.
This should be the case, one would think. However I just created an EXT4 partiton with Gparted and mounted it (both via terminal and then via fstab) at a directory called TEST under my home. Strange thing, I couldn't have write access to it,
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.