LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   External HDD Read only? (https://www.linuxquestions.org/questions/linux-newbie-8/external-hdd-read-only-4175582745/)

jackfrostt25 06-21-2016 08:43 AM

External HDD Read only?
 
Total noob here.

When I plug in an external hard drive (to back up data), I get read only permission. Is there a way to go about unmounting and mounting an external hard drive to give it read/write permission? Copy/pasting files from the computer to external hard drive won't work well because there is just far too much data (work computer with science data), so figuring out how to give it write permission would help a lot. It's a seagate [unfortunately].

So far I have tried to unmount and mount back again (from a google search) but never was able to get the write permission restored. also the dfsck command (iirc) showed something about volume zero. Can't remember correctly.

Thank you for your help in advance.

FYI:

/dev/sde1 mounted on /media/user/X Lab

I had some trouble because, for whatever reason, there is a space in the name which makes it difficult for me to work with those settings, so I've been trying to do everything via /dev/sde1

pan64 06-21-2016 09:06 AM

just please post the error message, otherwise we won't remember the solution correctly.
I think the device is locked because of that error

jackfrostt25 06-21-2016 09:19 AM

Quote:

Originally Posted by pan64 (Post 5564157)
just please post the error message, otherwise we won't remember the solution correctly.
I think the device is locked because of that error

"Error while copying to "X"
The destination is read-only"


I've been trying to redo the fsck error to post, but for some reason it's different today (go figure). Now I get:

fsck: fsck.hfsplus: not found
fsck: error 2 while executing fsck.hfsplus for /def/sde1


So I thought I would try ntfsfix since someone else did that on a similar HDD. What I got: NTFS signature missing

Not sure where to go from there, been reading other google/solutions but at a loss.

suicidaleggroll 06-21-2016 09:55 AM

fsck.hfsplus is only used for HFS+ filesystems
ntfsfix is only used for NTFS filesystems

Neither of which are native Linux filesystems and shouldn't be used unless absolutely necessary. What filesystem are you actually using???

jackfrostt25 06-21-2016 09:58 AM

Quote:

Originally Posted by suicidaleggroll (Post 5564170)
fsck.hfsplus is only used for HFS+ filesystems
ntfsfix is only used for NTFS filesystems

Neither of which are native Linux filesystems and shouldn't be used unless absolutely necessary. What filesystem are you actually using???

I couldn't tell you. How would I check?

Going through other linux user questions about a similar topic, some of these seemed to solve it for them, so thought I'd try it, though doesn't work for me.

suicidaleggroll 06-21-2016 10:09 AM

When it's mounted, run "df -hT". The second column will tell you the filesystem type. You could also open up gparted or similar which will tell you the fileystem.

You don't want to run a filesystem check/correction program that's designed for a filesystem you are not using. Best case is it will refuse to run, worst case is it will try, and screw everything up.

jackfrostt25 06-21-2016 10:15 AM

Quote:

Originally Posted by suicidaleggroll (Post 5564178)
When it's mounted, run "df -hT". The second column will tell you the filesystem type. You could also open up gparted or similar which will tell you the fileystem.

You don't want to run a filesystem check/correction program that's designed for a filesystem you are not using. Best case is it will refuse to run, worst case is it will try, and screw everything up.

Ah I see, thanks for the heads up. It is hfsplus file type (wasn't expecting that one).

suicidaleggroll 06-21-2016 10:19 AM

Do you need to share this drive with a Mac system? If so, I don't think Linux HFS+ drivers are great, you'll need to do some digging there and you might want to reformat it to FAT32 for better compatibility. If you don't need to share with a Mac, then ditch HFS+ and reformat it with a regular Linux filesystem like ext4.

jackfrostt25 06-21-2016 10:24 AM

Quote:

Originally Posted by suicidaleggroll (Post 5564188)
Do you need to share this drive with a Mac system? If so, I don't think Linux HFS+ drivers are great, you'll need to do some digging there and you might want to reformat it to FAT32 for better compatibility. If you don't need to share with a Mac, then ditch HFS+ and reformat it with a regular Linux filesystem like ext4.

Hmm well it is possible the drive will be shared with mac and windows in the future. It's a drive to backup data, who or when it'll be accessed is unknown.

So all I would have to do is find HFS+ drivers, and read/write ability will be restored?

suicidaleggroll 06-21-2016 10:37 AM

Assuming there are any read-write capable HFS+ drivers, the only ones available may be read-only. HFS+ support is really sketchy on Linux, and as far as I know completely non-existent on Windows. It's a Mac filesystem, through and through, and it is absolutely the wrong filesystem to use if you need to share between all three OSs.

FAT32 will be the most universal, but it doesn't support files larger than 4 GB, it doesn't support journaling which makes it very sensitive to sudden disconnects, and it has no concept of ownership or permissions, which means all of that information would be lost on any files you copy to it. NTFS is alright in Linux, but I don't know how good the Mac support is.

What kind of backups are we talking here? Just copying a few data files onto it from time to time, or automated full system backups? If the former, I would just go with FAT32 unless Mac's NTFS support is half-decent, in which case NTFS. If we're talking full system backups, you need to use a filesystem that's compatible with what's being backed up, and it will not be portable across all three OSs. You'd use HFS+ for Mac, NTFS for Windows, and ext4 (probably) for Linux...no ifs, ands, or buts about it.

jackfrostt25 06-21-2016 10:58 AM

Quote:

Originally Posted by suicidaleggroll (Post 5564201)
What kind of backups are we talking here? Just copying a few data files onto it from time to time, or automated full system backups? If the former, I would just go with FAT32 unless Mac's NTFS support is half-decent, in which case NTFS. If we're talking full system backups, you need to use a filesystem that's compatible with what's being backed up, and it will not be portable across all three OSs. You'd use HFS+ for Mac, NTFS for Windows, and ext4 (probably) for Linux...no ifs, ands, or buts about it.

I just need to remove about 700 GB of data from a hard drive to put onto the external HDD, so it would theoretically be a one time back up of a system more or less (what I was told to do, instead of them just buying a new HDD for whatever reason). I suppose going the FAT32 route would make sense? Basically someone -may- access it in the future, but is not guaranteed, and who knows on what system. Would it be possible to format the external HDD easily? Would I have to change it via terminal or is it an easy fix?

Sorry for all of the questions, and thanks again mate!

suicidaleggroll 06-21-2016 11:07 AM

If you're backing up a Linux system, I would use a Linux filesystem, probably ext4, because:

1) All permissions, attributes, and file types (soft and hard links, etc) will be natively supported, which means you could restore all of those files from the backup back onto the Linux system without issue. With a non-standard filesystem you could face issues ranging from minor to complete show-stopper trying to restore the files.

2) Linux is free, and virtualization software (VMWare Player, VirtualBox) is free. This means that if somebody in the future wants to read the drive and they don't have access to a Linux system, they can always set up a Linux virtual machine on whatever computer they do use, and read the drive in that without issue.


You can use gparted to reformat the drive if you aren't comfortable on the command line.

Shadow_7 06-21-2016 12:05 PM

Under optimal conditions:

# mount -o remount,rw /mount/point

You can also tell filesystem type by mount with no parms

$ mount

Although you have to find the mount in question in what might be a size-able list.

BW-userx 06-23-2016 07:00 AM

1. did you try assiing it to a group, then assigning you to that group giving it read/write permissions. What format is it using? MSDos does not see Linux permissions, and visa versa.

Quote:

I had some trouble because, for whatever reason, there is a space in the name which makes it difficult for me to work with those settings, so I've been trying to do everything via /dev/sde1
2. working with spaces.
Code:

#mount "/source path/and/name goes here" /mount/point/goes/here
Have you tried using quotes?

3. Are you using it pluged into a USB, nevertheless.

Code:

sudo chown  username:groupName /path/to/hard/drive -R
or
sudo chmod 755 /path/to/drive -R
or
sudo chmod 775 /path/to/drive -R

that will give whatever user name you are using to do this in read/write permissions to everything on that drive.
not /dev/sda etc.... this is not a directory, therefore it will throw an error.

LukeRFI 06-23-2016 07:21 AM

Linux, by default will only mount HFS+ in RO, but you can easily bypass it and still mount RW:

Quote:

Install hfsprogs
mount -t hfsplus -o force,rw {source} {mount}


All times are GMT -5. The time now is 08:00 PM.