LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ext HD read only file system (https://www.linuxquestions.org/questions/linux-newbie-8/ext-hd-read-only-file-system-4175601655/)

michele_deb 03-13-2017 06:25 AM

ext HD read only file system
 
Hi guys,
I am running Arch on a VM and, if I try to copy a directory (or a folder) in my external usb HD, I get: read only file system (even if I try to copy a file, already on the HD, in a folder on the same HD). I was not able to change permission. Why? What should I do?
Thanks.

jsbjsb001 03-13-2017 08:18 AM

Quote:

Originally Posted by michele_deb (Post 5682804)
Hi guys,
I am running Arch on a VM and, if I try to copy a directory (or a folder) in my external usb HD, I get: read only file system (even if I try to copy already on the HD in a folder on the same HD). I was not able to change permission. Why? What should I do?
Thanks.

Which file system is your external USB HDD formatted with?

If it's formatted with NTFS and you did not un-mount it properly, the last time you used it; you may need to mount it in Windows, to clear the NTFS journal.

pan64 03-13-2017 09:24 AM

you may need to check how it was mounted.

michele_deb 03-13-2017 11:06 AM

Quote:

Originally Posted by jsbjsb001 (Post 5682840)
Which file system is your external USB HDD formatted with?

If it's formatted with NTFS and you did not un-mount it properly, the last time you used it; you may need to mount it in Windows, to clear the NTFS journal.

Well,
file system is NTFS (I checked it typing df -T in a terminal), but honestly, I don't remember if I have un-mounted not properly the last time. Does I have to mount it manually in a terminal on arch(even if I see the HD in the devices lis?)? I think the problem is that I have never mounted (in a terminal) the external HD. I read that the best way is typing:
Code:

mount -t ntfs-3g /dev/<your-NTFS-partition> /mnt/folder
. Is right?

michele_deb 03-13-2017 11:08 AM

Quote:

Originally Posted by pan64 (Post 5682860)
you may need to check how it was mounted.

I think I have never mounted the HD. Sorry but I am new of Linux world. Can you tell me if a GUI for mount and un-mount a disk is available in arch? If yes, how to install it?
Thanks.

jsbjsb001 03-13-2017 11:33 AM

Quote:

Originally Posted by michele_deb (Post 5682898)
Well,
file system is NTFS (I checked it typing df -T in a terminal), but honestly, I don't remember if I have un-mounted not properly the last time. Does I have to mount it manually in a terminal on arch(even if I see the HD in the devices lis?)? I think the problem is that I have never mounted (in a terminal) the external HD. I read that the best way is typing:
Code:

mount -t ntfs-3g /dev/<your-NTFS-partition> /mnt/folder
. Is right?

If there is a GUI way of mounting it (and that's how you are mounting it), then, no, you do not need to mount it, in the terminal. I suspect that it was not un-mounted properly before and that's why it's, mounting the file system, as read-only (as I suggested before - post #2).

pan64 03-13-2017 11:39 AM

you simply execute the mount command in a terminal and will see if it was mounted read only (or not)

rtmistler 03-13-2017 11:46 AM

Quote:

Originally Posted by michele_deb (Post 5682898)
Well,
file system is NTFS (I checked it typing df -T in a terminal), but honestly, I don't remember if I have un-mounted not properly the last time. Does I have to mount it manually in a terminal on arch(even if I see the HD in the devices lis?)? I think the problem is that I have never mounted (in a terminal) the external HD. I read that the best way is typing:
Code:

mount -t ntfs-3g /dev/<your-NTFS-partition> /mnt/folder
. Is right?

Hi,

I think the issue here is the mount command was not done using sudo. Which actually is a very typical mount command error that many of us make. Yes, even those who have been using Linux for years. We sometimes type fast, and assume stuff and then figure it out once we've been forced to stop due to that type of error.

Are you aware of the use of sudo? Which is the way to allow a regular user to have super-user privileges for the purpose of executing that command?

What you should have done was to create the /mnt/folder using sudo:
Code:

$ sudo mkdir /mnt/folder
And then issued your mount command also using sudo:
Code:

$ sudo mount -t ntfs-3g /dev/<your-NTFS-partition> /mnt/folder
When you issue a command using sudo, it should ask you for your password.

I'm not an Arch user myself, so if that is the type of distribution where you are always the root user, I do not know.

Additionally, I can move this thread to the Arch forum to give it more Arch Linux specific attention. If you'd like that, then please click the Report button and in the dialogue, just state to please move the thread.

The Arch forum is located here for any future thread questions which are Arch specific where you feel that forum may be more appropriate for your needs.

michele_deb 03-13-2017 12:07 PM

Quote:

Originally Posted by jsbjsb001 (Post 5682910)
If there is a GUI way of mounting it (and that's how you are mounting it), then, no, you do not need to mount it, in the terminal. I suspect that it was not un-mounted properly before and that's why it's, mounting the file system, as read-only (as I suggested before - post #2).

Thanks a lot jsbjsb001,
I was able to fix the problem. I try to explain:

1) First of all, typing the command lsblk -f, I checked which is the name of the NTFS partition (sdd1 in my case).
2) I could see the ext HD mounted (somenthing like "MICHELE HD EXT") on the desktop (most likely because of udisks2 already installed, I suppose. Does udisks mount automatically the HD?) and, for this reason, I have just un-mounted it, clicking with right mouse botton.
3) Than, I have created a dir in /mnt named hdext (mkdir /mnt/hdext), and typed mount /dev/sdd1 /mnt/hdext

Now I can write in the disk (lunch and ./install from a folder, for instance). So, the problem was not the way I have unmounted the HD.
I don't know if, the above, is a spartan way of doing.

jsbjsb001 03-13-2017 12:20 PM

Quote:

Originally Posted by michele_deb (Post 5682925)
Thanks a lot jsbjsb001,
I was able to fix the problem. I try to explain:

1) First of all, typing the command lsblk -f, I checked which is the name of the NTFS partition (sdd1 in my case).
2) I could see the ext HD mounted (somenthing like "MICHELE HD EXT") on the desktop (most likely because of udisks2 already installed, I suppose. Does udisks mount automatically the HD?) and, for this reason, I have just un-mounted it, clicking with right mouse botton.
3) Than, I have created a dir in /mnt named hdext (mkdir /mnt/hdext), and typed mount /dev/sdd1 /mnt/hdext

Now I can write in the disk (lunch and ./install from a folder, for instance). So, the problem was not the way I have unmounted the HD.
I don't know if, the above, is a spartan way of doing.

USB (and alike) normally, mount on-demand (like when you click, on your USB device, in the GUI). The reason I was suggesting what I was, was because, if it's not un-mounted properly, Linux will normally as a safety measure, mount the file system as read-only (to prevent damage to it).

Glad to hear you've fixed it, good job! :hattip:

michele_deb 03-13-2017 12:22 PM

Quote:

Originally Posted by rtmistler (Post 5682920)
Hi,

I think the issue here is the mount command was not done using sudo. Which actually is a very typical mount command error that many of us make. Yes, even those who have been using Linux for years. We sometimes type fast, and assume stuff and then figure it out once we've been forced to stop due to that type of error.

Are you aware of the use of sudo? Which is the way to allow a regular user to have super-user privileges for the purpose of executing that command?

What you should have done was to create the /mnt/folder using sudo:
Code:

$ sudo mkdir /mnt/folder
And then issued your mount command also using sudo:
Code:

$ sudo mount -t ntfs-3g /dev/<your-NTFS-partition> /mnt/folder
When you issue a command using sudo, it should ask you for your password.

I'm not an Arch user myself, so if that is the type of distribution where you are always the root user, I do not know.

Additionally, I can move this thread to the Arch forum to give it more Arch Linux specific attention. If you'd like that, then please click the Report button and in the dialogue, just state to please move the thread.

The Arch forum is located here for any future thread questions which are Arch specific where you feel that forum may be more appropriate for your needs.

Thanks a lot for your help rtmistler.
As you can see in my last post (#9), I found a solution. I hope ahahahah! Well, I was in a terminal as root, for this reason I did not type the sudo command before mkdir and mount :D. What is strange for me, and don't understand is:
if I could see the HD icon on the desktop and in devices list, it means that the HD was mounted. Is right? If yes, why I was not able to write on the disk?

michele_deb 03-13-2017 12:26 PM

Quote:

Originally Posted by jsbjsb001 (Post 5682930)
USB (and alike) normally, mount on-demand (like when you click, on your USB device, in the GUI). The reason I was suggesting what I was, was because, if it's not un-mounted properly, Linux will normally as a safety measure, mount the file system as read-only (to prevent damage to it).

Glad to hear you've fixed it, good job! :hattip:

OK! Now a lot of stuff is more clear. I hope the solution I found, can help other users.:)

Rickkkk 03-14-2017 10:09 AM

Hi michele_deb:

For automatic mounting via GUI, depending on the DE you use (I use both LXDE and Gnome on different machines with Arch), the file manager usually takes care of it (pcmanfm is my favourite). Make sure the option for automounting removeable media is checked.

I think you mentioned at the outset that you are running Arch in a VM - also make sure you have USB settings configured correctly in the VM management utility.

Cheers - glad to hear you're up and running.

michele_deb 03-14-2017 10:21 AM

Quote:

Originally Posted by Rickkkk (Post 5683306)
Hi michele_deb:

For automatic mounting via GUI, depending on the DE you use (I use both LXDE and Gnome on different machines with Arch), the file manager usually takes care of it (pcmanfm is my favourite). Make sure the option for automounting removeable media is checked.

I think you mentioned at the outset that you are running Arch in a VM - also make sure you have USB settings configured correctly in the VM management utility.

Cheers - glad to hear you're up and running.

Hi Rickkkk,
my DE is xfce4. Where I have to check whether the automounting is checked? pcmanfm comes with basic installation of arch?
Thank you :)

Rickkkk 03-14-2017 10:59 AM

Quote:

Originally Posted by michele_deb (Post 5683308)
Hi Rickkkk,
my DE is xfce4. Where I have to check whether the automounting is checked? pcmanfm comes with basic installation of arch?
Thank you :)

Hi michele - pcmanfm comes by default with the lxde DE. Arch itself doesn't even come with any default DE or WM or even X - just a CLI. You choose what you want to add (one of the reasons I prefer Arch).

xfce4 uses Thunar, if I remember properly. In Thunar, go to Edit / Preferences / Advanced tab, click "Enable Volume Management", "Configure" and then click the appropriate boxes in the dialogue that opens up.

Hope this helps - Cheers !


All times are GMT -5. The time now is 01:02 PM.