New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Write-permissions on mounted, external Hard Drive?

Got problems with your B2 or B3? Share and get helped!
Post Reply
Klingan
Posts: 27
Joined: 09 Nov 2010, 14:57

Write-permissions on mounted, external Hard Drive?

Post by Klingan »

"Hello world."
Unit: B3
Category: HDD-issues > Read/Write-permissions

I have physically, and software-wise connected a 1TB WD Hard Disk Drive.
The disk shows up correctly under

Code: Select all

/home/storage/external/Western_Digital_1TB
I can not however, write to the disk. It's impossible to create, move or delete folders/files.
It alerts "You must have permission to perform this operation". It has earlier asked for the
admin-account, where-as I logged on to that account (Samba-sharing) and got the same error.

I tried editing permissions in the WebUI under "File Manager". I was not able to change those
parameters to writing-rights either.

What I would like to do is the following:
1.) Be able to write to the external drive
2.) If necessary, change the owning rights from "admin" to my personal user on the B3.

Any clues?
Thank you in advance.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Write-permissions on mounted, external Hard Drive?

Post by Ubi »

are you trying to add files via samba and a windows client or via "/home/storage/external/Western_Digital_1TB"

ubi
Klingan
Posts: 27
Joined: 09 Nov 2010, 14:57

Re: Write-permissions on mounted, external Hard Drive?

Post by Klingan »

Ubi wrote:are you trying to add files via samba and a windows client or via "/home/storage/external/Western_Digital_1TB"

ubi
Via Windows/Samba, not via the GUI File Manager. :)
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Write-permissions on mounted, external Hard Drive?

Post by Ubi »

go the the ssh shell, become root (password=excito)
go to the mount point of that disk and create a writable folder

Code: Select all

cd /home/storage/external/Western_Digital_1TB
mkdir test
chmod 777 test
now go to your windows machine and look for the samba mount. you should be able to see that test folder that you just created, and that folder should be writable. place a new file into that folder. now go back to your ssh terminal and do

Code: Select all

cd /home/storage/external/Western_Digital_1TB/test
ls -la
id
show all the output from these two commands

hope this helps
ubi
Klingan
Posts: 27
Joined: 09 Nov 2010, 14:57

Re: Write-permissions on mounted, external Hard Drive?

Post by Klingan »

Ubi wrote:go the the ssh shell, become root (password=excito)
go to the mount point of that disk and create a writable folder

Code: Select all

cd /home/storage/external/Western_Digital_1TB
mkdir test
chmod 777 test
now go to your windows machine and look for the samba mount. you should be able to see that test folder that you just created, and that folder should be writable. place a new file into that folder. now go back to your ssh terminal and do

Code: Select all

cd /home/storage/external/Western_Digital_1TB/test
ls -la
id
show all the output from these two commands

hope this helps
ubi
Thanks a lot. I'll be on that tomorrow. And how do I login through SSH? Putty? I'm a Windows-user. ^.-
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Write-permissions on mounted, external Hard Drive?

Post by DanielM »

Klingan wrote:Thanks a lot. I'll be on that tomorrow. And how do I login through SSH? Putty? I'm a Windows-user. ^.-
http://wiki.excito.org/wiki/index.php/T ... er_via_SSH

/Daniel
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Re: Write-permissions on mounted, external Hard Drive?

Post by tor »

Hi Klingan,

Just to be sure, the disk in question isn't a Windows NTFS formatted one? B3 unfortunately can't write to those atm, only read from them :(

/Tor
Co-founder OpenProducts and Ex Excito Developer
Klingan
Posts: 27
Joined: 09 Nov 2010, 14:57

Re: Write-permissions on mounted, external Hard Drive?

Post by Klingan »

tor wrote:Hi Klingan,

Just to be sure, the disk in question isn't a Windows NTFS formatted one? B3 unfortunately can't write to those atm, only read from them :(

/Tor
Yes it is, I figured that could be the problem too.
I did however have that issue when it was connected to the PC itself
- it sometimes wasn't writable. I then had to reconnect the drive, and it was writable again.
No clue why?
Asad
Posts: 31
Joined: 24 Sep 2010, 11:32

Re: Write-permissions on mounted, external Hard Drive?

Post by Asad »

try doing:

apt-get install ntf3-3g

and then mount it again from the shell, not from the GUI.
it works for me.
Klingan
Posts: 27
Joined: 09 Nov 2010, 14:57

Re: Write-permissions on mounted, external Hard Drive?

Post by Klingan »

starlight wrote:try doing:

apt-get install ntf3-3g

and then mount it again from the shell, not from the GUI.
it works for me.
Hello!

I'll try this tomorrow. But before I do, let me get a few things straight.

The only option amongst file systems is NTFS if I want to be able to plug it into a Windows-computer,
and store files bigger than 4 GB?
FAT32 supports read/write natively, but doesn't support files bigger than 4 GB.
EXT2/3/4 supports files bigger than 4 GB, but cannot be mounted on a Windows-machine.

Are the above statements correct?

Question: How do I mount a disk from the SSH shell, once I have root access?


Thank you in advance!
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Write-permissions on mounted, external Hard Drive?

Post by Ubi »

mount /dev/sda1 /mnt/somemountpoint

http://www.google.nl/search?q=mount+linux
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Write-permissions on mounted, external Hard Drive?

Post by Cheeseboy »

EDIT:
Please read Ubis post above before this one.
He managed to say the same thing I tried to say in 1 line.
--------------------------

Howdy,

My replies are only based on own experience and what I have read...
The only option amongst file systems is NTFS if I want to be able to plug it into a Windows-computer,
and store files bigger than 4 GB?
FAT32 supports read/write natively, but doesn't support files bigger than 4 GB.
EXT2/3/4 supports files bigger than 4 GB, but cannot be mounted on a Windows-machine.
Yes, all is correct - except: there are solutions for Windows using EXT(n) and other filesystems, but all I have read about them is that they are crap.
Question: How do I mount a disk from the SSH shell, once I have root access?
You need to find out it's device name if it is not mounted automagically.
I'm sure there is a better way than this of doing it, but I haven't found one.
Steps:
- Plug the device in.

Code: Select all

dmesg
- Example of result:

Code: Select all

[[445483.672217] scsi 3:0:0:0: Direct-Access     SAMSUNG  HM120JC          YL10 PQ: 0 ANSI: 0 CCS
[445483.681225] sd 3:0:0:0: Attached scsi generic sg1 type 0
[445483.699654] sd 3:0:0:0: [sdb] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[445483.714495] sd 3:0:0:0: [sdb] Write Protect is off
[445483.719422] sd 3:0:0:0: [sdb] Mode Sense: 00 14 00 00
[445483.719432] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[445483.727390] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[445483.733651]  sdb: sdb1 sdb2]
- The last line tells me that my USB device has been assigned the device name /dev/sdb
There is an old naming convention here:
SCSI Disk A (/dev/sda), SCSI DiskB (/dev/sdb), etc. The fact that they are not in fact SCSI disks can be ignored for now.

- There are also partitions on disks.
The last line in the output above shows that there are two partitions on the disk I attached:
sdb1 and sdb2

- When you know what disk (and partition) you want to mount, you need to create a mountpoint, if there isn't one already. The mount point is just a directory in the existing file system, usually under /mnt or /media, but you can create it wherever you want:

Code: Select all

mkdir ~/mnt
- Then you have to mount it using the mount command as root. Most often, it will detect the file system of your disk automagically (again! isn't it fantastic?). The simplest syntax is "mount <device> <mountpoint>":

Code: Select all

sudo mount /dev/sdb1 ~/mnt
Note that the sudo prefix is just instead of being root when issuing the command...

You can see the succesfully mounted file systems with:

Code: Select all

df -h
If it fails, it might be that it fails to recognize the type of the file system, or that it is not a proper file system.
The most common mistake I do is to use the disk rather than the partition as the first argument (i.e. /dev/sdb instead of /dev/sdb1)

You will also need to specify the type with the -t switch to "mount" if you are using a non-default file system like ntfs-3g.

Hope this helps (it looks confusing even to me, who wrote it...)

/Cheeseboy
Last edited by Cheeseboy on 30 Dec 2010, 15:27, edited 1 time in total.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Write-permissions on mounted, external Hard Drive?

Post by Ubi »

thanks for the kudos, but your solution is better. I had him mount the wrong disk :D
Post Reply