You are not logged in.
pmount is just a wrapper, it calls the standard mount program to actually do the work, without the need to have an entry in fstab. Let's first make sure that you can mount and use the drive with the standard old-fashioned mount. When we get that to work, switching should be just a matter of using correct pmount options or doing some minor tweaks.
From what you linked, I assume you are using ext filesystem, which should make things a lot easier. If you're using something else, you need to let us know.
First things first, lets start from the beginning. Umount the drive and set permissions on the empty directory you're mounting it into back to root (or just remove it and recreate it as root). This is not essential, just doing that so we know the current state of things.
Second, mount the drive with simple mount /dev/sdx /mnt/mountpoint Obviously you need to change the device and mountpoint to whatever's appropriate. This *should* work. Logged in as root, try to create a directory inside, and for example copy something into this new directory, to make 100% sure that the drive is correctly mounted. If you get past this point and everything works, then this all is most likely just a case of botched permissions. You can't write into it as a user yet, but we now know that it can be correctly mounted.
Third, find out your user uid, and your primary group gid. Simply type 'id' into terminal logged in as regular user you want to mount the drive with, if it's the only user you created shortly after system installation, then most likely your uid will be 1000 and gid of users group will be 100. Now umount the drive, and re-mount it with running as root mount -o uid=1000,gid=100 /dev/sdx /mnt/mountpoint Again, change everything as appropriate. You now should be able to write new files and directories onto your drive as your normal user. You still may not be able to edit files already stored in if permissions were set wrong, but that can be changed, as we discussed before.
If this all works, then you can use your drive without any problems, and one line in your fstab will mean that you can mount the drive as user without even needing pmount. Please verify everything works first, if it does we can help you with that as well if you need it. And sorry if I'm being too thorough, just trying to avoid any mistakes
edit: to avoid any confusion, this is more or less a test. When mounting ext partitions you shouldn't have to set things like uid, gid or umask. Those options are primarily meant for filesystems which don't use this kind of permission setting, like vfat or ntfs. But it should move us a little bit further.
Right, deleted folder /media/sdb1 (where it was mounted with pmount). Remade it as root.
Mounted the external hard drive as root. Worked fine.
However:
[root@theninthgate sdb1]# mkdir test
mkdir: cannot create directory `test': Operation not permitted
:-(
EDIT: The external harddrive is ntfs, I believe. My internal harddrive is ext4
Last edited by Throne777 (2012-03-31 17:10:12)
'All we ever were, just zeroes and ones'
Offline
EDIT: The external harddrive is ntfs, I believe. My internal harddrive is ext4
This is most likely your problem. Can you post output of df -T while the drive is mounted?
Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.
Offline
Filesystem Type 1K-blocks Used Available Use% Mounted on
rootfs rootfs 7662396 2914376 4363668 41% /
/dev devtmpfs 1024816 0 1024816 0% /dev
run tmpfs 1027740 244 1027496 1% /run
/dev/sda3 ext4 7662396 2914376 4363668 41% /
shm tmpfs 1027740 0 1027740 0% /dev/shm
tmpfs tmpfs 1027740 8 1027732 1% /tmp
/dev/sda1 ext2 99590 17903 76468 19% /boot
/dev/sda4 ext4 152576072 4649868 140287300 4% /home
/dev/sdb1 ntfs 976758780 405496496 571262284 42% /media/sdb1
'All we ever were, just zeroes and ones'
Offline
Yep, it's ntfs, that's the problem. This filesystem can be used, but it's a little bit more complicated.
You should read the wiki now: NTFS-3G. You also will have to deal with uid, gid and umask settings, read ntfs-3g manpage to find out more, it's all well explained there. There's not much point in us explaining anything now, before you read those instructions, but of course come back to us if you run into trouble.
Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.
Offline
Yep, it's ntfs, that's the problem. This filesystem can be used, but it's a little bit more complicated.
You should read the wiki now: NTFS-3G. You also will have to deal with uid, gid and umask settings, read ntfs-3g manpage to find out more, it's all well explained there. There's not much point in us explaining anything now, before you read those instructions, but of course come back to us if you run into trouble.
Awesome. Got NTFS-3G set up and I can now read/write to it ^ ^
Now is the final hurdle; being able to delete stuff off it. If I delete something it creates a hidden .Trash-1000 folder on the external HDD and moves stuff there. Problem is I can't delete stuff from that (i.e. actually delete the files).
Unable to move files to the wastebasket: invalid argument
This might have something to do with the fact that thunar isn't giving me a Wastebasket :s
Last edited by Throne777 (2012-03-31 17:56:17)
'All we ever were, just zeroes and ones'
Offline
meph wrote:Yep, it's ntfs, that's the problem. This filesystem can be used, but it's a little bit more complicated.
You should read the wiki now: NTFS-3G. You also will have to deal with uid, gid and umask settings, read ntfs-3g manpage to find out more, it's all well explained there. There's not much point in us explaining anything now, before you read those instructions, but of course come back to us if you run into trouble.
Awesome. Got NTFS-3G set up and I can now read/write to it ^ ^
Now is the final hurdle; being able to delete stuff off it. If I delete something it creates a hidden .Trash-1000 folder on the external HDD and moves stuff there. Problem is I can't delete stuff from that (i.e. actually delete the files).Unable to move files to the wastebasket: invalid argument
This might have something to do with the fact that thunar isn't giving me a Wastebasket :s
What if you try to delete them via terminal? Or even better, logged in as root? edit: actually if you're going to try it, then try first deleting something as normal user and then as root. The more info we get on this, the better.
Beware though, I never had this problem myself, no idea what forcibly removing those files will do. I don't see why anything bad should happen, but at your own risk.
Last edited by meph (2012-03-31 18:15:59)
Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.
Offline
Throne777 wrote:meph wrote:Yep, it's ntfs, that's the problem. This filesystem can be used, but it's a little bit more complicated.
You should read the wiki now: NTFS-3G. You also will have to deal with uid, gid and umask settings, read ntfs-3g manpage to find out more, it's all well explained there. There's not much point in us explaining anything now, before you read those instructions, but of course come back to us if you run into trouble.
Awesome. Got NTFS-3G set up and I can now read/write to it ^ ^
Now is the final hurdle; being able to delete stuff off it. If I delete something it creates a hidden .Trash-1000 folder on the external HDD and moves stuff there. Problem is I can't delete stuff from that (i.e. actually delete the files).Unable to move files to the wastebasket: invalid argument
This might have something to do with the fact that thunar isn't giving me a Wastebasket :s
What if you try to delete them via terminal? Or even better, logged in as root? edit: actually if you're going to try it, then try first deleting something as normal user and then as root. The more info we get on this, the better.
Beware though, I never had this problem myself, no idea what forcibly removing those files will do. I don't see why anything bad should happen, but at your own risk.
[throne777@theninthgate files]$ rm /media/sdb1/.Trash-1000/files/cover.jpg
Seemed to work. File's no longer there.
(For future reference - how do you rm a file that has spaces in it? e.g. if the file's called 'hello world how are you.mp3')
'All we ever were, just zeroes and ones'
Offline
Just put quotes around the file name or around the whole path, should work. Another way would be to put \ before the space.
rm "hello world how are you.mp3"
rm hello\ world\ how\ are\ you.mp3
these should both do the job. Bash completion via TAB key is your friend here, it uses the 2nd method on its own.
By the way. If I remember correctly, NTFS has some sort of a problem with files and directories created in linux, whose name begins with a dot. When you use a windows-based filesystem under linux, it can't magically work as though it was linux native, it will still abide to the same limitations. It might have something to do with the fact that you couldn't delete the .trash directory. If you're going to use this drive primarily on linux, then you might want consider switching to a linux native filesystem, like ext3. It's very simple to use under linux, and there's an open source ext2/3 driver for windows that allows rw access. This is what I had on my external drive a while back: a big ext3 partition for all the data, and a very small ntfs partition only big enough to carry the ntfs driver, just in case, so I could have it always with me.
Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.
Offline
Just put quotes around the file name or around the whole path, should work. Another way would be to put \ before the space.
rm "hello world how are you.mp3" rm hello\ world\ how\ are\ you.mp3
these should both do the job. Bash completion via TAB key is your friend here, it uses the 2nd method on its own.
By the way. If I remember correctly, NTFS has some sort of a problem with files and directories created in linux, whose name begins with a dot. When you use a windows-based filesystem under linux, it can't magically work as though it was linux native, it will still abide to the same limitations. It might have something to do with the fact that you couldn't delete the .trash directory. If you're going to use this drive primarily on linux, then you might want consider switching to a linux native filesystem, like ext3. It's very simple to use under linux, and there's an open source ext2/3 driver for windows that allows rw access. This is what I had on my external drive a while back: a big ext3 partition for all the data, and a very small ntfs partition only big enough to carry the ntfs driver, just in case, so I could have it always with me.
Any way to convert the hard drive without destroying the data on it? I have over 20,000 songs on there; I will literally have a 10 year breakdown if I lose it all
'All we ever were, just zeroes and ones'
Offline
meph wrote:Just put quotes around the file name or around the whole path, should work. Another way would be to put \ before the space.
rm "hello world how are you.mp3" rm hello\ world\ how\ are\ you.mp3
these should both do the job. Bash completion via TAB key is your friend here, it uses the 2nd method on its own.
By the way. If I remember correctly, NTFS has some sort of a problem with files and directories created in linux, whose name begins with a dot. When you use a windows-based filesystem under linux, it can't magically work as though it was linux native, it will still abide to the same limitations. It might have something to do with the fact that you couldn't delete the .trash directory. If you're going to use this drive primarily on linux, then you might want consider switching to a linux native filesystem, like ext3. It's very simple to use under linux, and there's an open source ext2/3 driver for windows that allows rw access. This is what I had on my external drive a while back: a big ext3 partition for all the data, and a very small ntfs partition only big enough to carry the ntfs driver, just in case, so I could have it always with me.
Any way to convert the hard drive without destroying the data on it? I have over 20,000 songs on there; I will literally have a 10 year breakdown if I lose it all
No, there's no way of doing that directly. You could backup your data someplace else (friends computer, borrow another removable drive, whatever). Also there's another possibility, but it's a bit risky. You're using 42% of the capacity of your drive, which means that you could shrink the active ntfs partition to half of its size, on the freed up hd space create a new ext3 partition, move over the data, delete ntfs partition and expand the new ext3 with all the data to full disk capacity. Sort of a Hanoi tower, if you know the game It can be done without losing data, but it's risky, you never know what will happen in case of a power failure. Or you could stay with ntfs. Up to you. But remember that switching to ext3 will make your windows life a little bit harder. Currently there isn't a modern filesystem that would natively work on both windows and linux.
Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.
Offline
If you want user access, you'll need fuse.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Throne777 wrote:meph wrote:Just put quotes around the file name or around the whole path, should work. Another way would be to put \ before the space.
rm "hello world how are you.mp3" rm hello\ world\ how\ are\ you.mp3
these should both do the job. Bash completion via TAB key is your friend here, it uses the 2nd method on its own.
By the way. If I remember correctly, NTFS has some sort of a problem with files and directories created in linux, whose name begins with a dot. When you use a windows-based filesystem under linux, it can't magically work as though it was linux native, it will still abide to the same limitations. It might have something to do with the fact that you couldn't delete the .trash directory. If you're going to use this drive primarily on linux, then you might want consider switching to a linux native filesystem, like ext3. It's very simple to use under linux, and there's an open source ext2/3 driver for windows that allows rw access. This is what I had on my external drive a while back: a big ext3 partition for all the data, and a very small ntfs partition only big enough to carry the ntfs driver, just in case, so I could have it always with me.
Any way to convert the hard drive without destroying the data on it? I have over 20,000 songs on there; I will literally have a 10 year breakdown if I lose it all
No, there's no way of doing that directly. You could backup your data someplace else (friends computer, borrow another removable drive, whatever). Also there's another possibility, but it's a bit risky. You're using 42% of the capacity of your drive, which means that you could shrink the active ntfs partition to half of its size, on the freed up hd space create a new ext3 partition, move over the data, delete ntfs partition and expand the new ext3 with all the data to full disk capacity. Sort of a Hanoi tower, if you know the game It can be done without losing data, but it's risky, you never know what will happen in case of a power failure. Or you could stay with ntfs. Up to you. But remember that switching to ext3 will make your windows life a little bit harder. Currently there isn't a modern filesystem that would natively work on both windows and linux.
Note: I haven't had a 'windows' life for a good few years now, so that's no issue at all.
What could I use to partition the external HDD? Also, why ext3 and not ext4? (I have sod all clue about the differences in file systems)
'All we ever were, just zeroes and ones'
Offline
meph wrote:Throne777 wrote:Any way to convert the hard drive without destroying the data on it? I have over 20,000 songs on there; I will literally have a 10 year breakdown if I lose it all
No, there's no way of doing that directly. You could backup your data someplace else (friends computer, borrow another removable drive, whatever). Also there's another possibility, but it's a bit risky. You're using 42% of the capacity of your drive, which means that you could shrink the active ntfs partition to half of its size, on the freed up hd space create a new ext3 partition, move over the data, delete ntfs partition and expand the new ext3 with all the data to full disk capacity. Sort of a Hanoi tower, if you know the game It can be done without losing data, but it's risky, you never know what will happen in case of a power failure. Or you could stay with ntfs. Up to you. But remember that switching to ext3 will make your windows life a little bit harder. Currently there isn't a modern filesystem that would natively work on both windows and linux.
Note: I haven't had a 'windows' life for a good few years now, so that's no issue at all.
What could I use to partition the external HDD? Also, why ext3 and not ext4? (I have sod all clue about the differences in file systems)
If you don't use windows at all, then you'll do better with ext. For this kind of purpose I prefer ext3, because it has far better support in windows (via 3rd party drivers). Last time I checked, which was a few months ago, there still wasn't a driver for ext4 which would enable full read/write support in windows. And I sometimes connect the disk to a windows machine, so that's why.
I'm pretty sure that gparted can resize ext partitions, not sure about the ntfs partition. I always did this directly from windows, it has its own tool to resize ntfs. You'll have to do some googling to verify gparted (or other software) can do it without data loss.
Last edited by meph (2012-04-01 09:20:04)
Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.
Offline