Going INSANE trying to simply change DRIVE PERMISSIONS

trying to suppress my anger! :wink:
Can anyone explain to me why Konquerer, chmod, and chown cannot change drive permissions even though they clearly boast to be able to do so? And also, why the defaults in Linux are set up so that a non-root user cannot connect a new drive to the machine and begin writing to it?

I have spent months of my free time trying to simply give myself read/write/execute permissions on an external drive. Iā€™ve gone on multiple forums and have done hours of research. Why does Linux make this so ridiculously IMPOSSIBLE!!?? Shouldnā€™t an individual who buys a new external drive be able to use it? I mean cā€™mon. The defaults in Linux are ridiculous. You have to jump through hoops to change permissions of a new drive before you can even write to it. What is a drive for if you canā€™t write to it?!

First, I was told that the reason I couldnā€™t read/write/execute, or even modify the permissions was because it was formatted to NTFS, so I reformatted it to FAT. That didnā€™t do anything. Same thing: non-root users cant write to the drive and it was still impossible to change permissions even After hours of trying chmod and chown (not to mention attempts with the Konqueror GUI). The only way to USE the drive was to be LOGGED IN as ROOT, and we all know thatā€™s a bad idea.

So I formatted it to ext3, thinking that a native format would sit better with my version of OpenSuSe 10.3. Nope. The default permissions are still the same and it is still impossible to change the permissions.

It baffles me that chmod and chown donā€™t work at all (ā€œpermission deniedā€) even in Super User mode, and that the pretty little window in Konqueror that has the nice little dropdown menus, allowing one to change the permissions to a drive, does nothing at all. Just a host of error messages.

I have changed distros - UBUNTU to DEBIAN to OPENSUSE hoping that one of these would be more friendly to the external drive. No luck.

My computer whiz - slackware raised - Brother in Law has been killing himself trying to help me out to no avail.

Anyone want to take a crack at this?

Iā€™d really appreciate it.

1 Like

Is it automounted in fstab? You can change the permissions of the drive there. (Although I suspect your brother-in-law will have tried that if you didnā€™t)

On Tue, 01 Jul 2008 23:26:04 GMT
theprinciple <theprinciple@no-mx.forums.opensuse.org> wrote:

>
> trying to suppress my anger! :wink:
> Can anyone explain to me why Konquerer, chmod, and chown cannot change
> drive permissions even though they clearly boast to be able to do so?
> And also, why the defaults in Linux are set up so that a non-root user
> cannot connect a new drive to the machine and begin writing to it?
>
> I have spent months of my free time trying to simply give myself
> read/write/execute permissions on an external drive. Iā€™ve gone on
> multiple forums and have done hours of research. Why does Linux make
> this so ridiculously IMPOSSIBLE!!?? Shouldnā€™t an individual who buys a
> new external drive be able to use it? I mean cā€™mon. The defaults in
> Linux are ridiculous. You have to jump through hoops to change
> permissions of a new drive before you can even write to it. What is a
> drive for if you canā€™t write to it?!
>
> First, I was told that the reason I couldnā€™t read/write/execute, or
> even modify the permissions was because it was formatted to NTFS, so I
> reformatted it to FAT. That didnā€™t do anything. Same thing: non-root
> users cant write to the drive and it was still impossible to change
> permissions even After hours of trying chmod and chown (not to mention
> attempts with the Konqueror GUI). The only way to USE the drive was to
> be LOGGED IN as ROOT, and we all know thatā€™s a bad idea.
>
> So I formatted it to ext3, thinking that a native format would sit
> better with my version of OpenSuSe 10.3. Nope. The default permissions
> are still the same and it is still impossible to change the
> permissions.
>
> It baffles me that chmod and chown donā€™t work at all (ā€œpermission
> deniedā€) even in Super User mode, and that the pretty little window in
> Konqueror that has the nice little dropdown menus, allowing one to
> change the permissions to a drive, does nothing at all. Just a host of
> error messages.
>
> I have changed distros - UBUNTU to DEBIAN to OPENSUSE hoping that one
> of these would be more friendly to the external drive. No luck.
>
> My computer whiz - slackware raised - Brother in Law has been killing
> himself trying to help me out to no avail.
>
> Anyone want to take a crack at this?
>
> Iā€™d really appreciate it.
>
>
Hi
Here is an fstab entry for both ntfs and fat

/dev/sda1 /windows/C ntfs
ro,users,gid=users,umask=0002,nls=utf8 0
0 /dev/sda2 /windows/D vfat
users,gid=users,umask=0002,utf8=true 0 0

What i would do is use the partitioner in yast and add a label to the
drive, then it will always mount that way and add fstab options.

The other thing is to create a directory and change ownership of that
directory to the user.

ā€“
Cheers Malcolm Ā°ĀæĀ° (Linux Counter #276890)
SLED 10.0 SP2 x86_64 Kernel 2.6.16.60-0.23-smp
up 1 day 6:46, 2 users, load average: 0.40, 0.23, 0.13
GPU GeForce 8600 GTS Silent - Driver Version: 173.14.09

Iā€™ve had this happen with the occasional pen drive, but I donā€™t have to login as root to write to it as root

Not sure if you know how to do this (or maybe just never thought of it), so here it is

In a terminal type su, enter the root password

When the passwordā€™s accepted and youā€™re at a root prompt, type konqueror media &

Youā€™re then running that instance of konqueror as root even though youā€™re not logged in as root, and so should be able to add and remove files etc that way

That reason is wrong. FAT filesystems do not have ownership information in the filesystem so the faked-up ā€œownershipā€ is determined at mount time, and it is logically impossible to change the ownerships because there are none to change.

If automounting is used, then the account mounting it ā€œownsā€ the drive. So if you are at the desktop and plug in the drive, the drive will be ā€œownedā€ by you.

If you want to share the drive across user accounts, what you need to do is change the automount options so that the group owner is ā€œusersā€ and the umask allows group writing. This is changed in the udev rules I believe, but somebody else will know better than me where to edit.

NTFS is another kettle of fish. It does have ownership information but I donā€™t know if Linux can change them via ntfs-3g. I donā€™t have an external NTFS drive.

Thanks to everyone for the quick replies

Well. I thought Iā€™d solved the problem. I started a kde session as root. I went into Yast (as per the suggestion) and reformatted the external drive. When that was done, navigated to the drive in Konqueror and changed the attributes so that all users can read/write/execute. I also changed the owner and group to that of my personal username.

Normally when I would do this in a non-root session (but using Super User Konqueror) it would either stall, or the changes would just not take. After executing the changes Iā€™d go back into the properties and theyā€™d be changed back to the defaults. This time, though, it worked!!

Yay! right? nope. I decided to restart my machine just for good measure and then log in as my personal user. I got a nice surprise. KDE wonā€™t boot. Iā€™m stuck in a failsafe terminal session.

Iā€™m going to have to reinstall Suse

one more chapter in an ongoing saga. This issue has been plaguing me for months. Unbelievable. :o

On Wed, 02 Jul 2008 02:26:04 GMT
theprinciple <theprinciple@no-mx.forums.opensuse.org> wrote:

>
> Thanks to everyone for the quick replies
>
> Well. I thought Iā€™d solved the problem. I started a kde session as
> root. I went into Yast (as per the suggestion) and reformatted the
> external drive. When that was done, navigated to the drive in
> Konqueror and changed the attributes so that all users can
> read/write/execute. I also changed the owner and group to that of my
> personal username.
>
> Normally when I would do this in a non-root session (but using Super
> User Konqueror) it would either stall, or the changes would just not
> take. After executing the changes Iā€™d go back into the properties and
> theyā€™d be changed back to the defaults. This time, though, it worked!!
>
> Yay! right? nope. I decided to restart my machine just for good
> measure and then log in as my personal user. I got a nice surprise.
> KDE wonā€™t boot. Iā€™m stuck in a failsafe terminal session.
>
> Iā€™m going to have to reinstall Suse
>
> one more chapter in an ongoing saga. This issue has been plaguing me
> for months. Unbelievable. :o
>
>
Hi
Sounds like the fstab entries are funny, just rem (use a #) any new
entries out and restart.

ā€“
Cheers Malcolm Ā°ĀæĀ° (Linux Counter #276890)
SLED 10.0 SP2 x86_64 Kernel 2.6.16.60-0.23-smp
up 1 day 9:44, 1 user, load average: 0.05, 0.05, 0.09
GPU GeForce 8600 GTS Silent - Driver Version: 173.14.09

Donā€™t reinstall Suse ā€“ fix fstab as recommended by malcolmlewis.

Also, would you like to nominate a filesystem and we could work on that until you get it right. Iā€™ve seen a couple of valid suggestions in this thread but it might be that you canā€™t see the tree standing in the woods.

Malcom and Swerdna, thanks for your replies.
Iā€™d already reinstalled SuSe before I got your replies. My brother and law and I were up till 4 am trying to fix the problem. I thought the reinstall would solve everything but it didnā€™t. Hereā€™s what happened.

I reinstalled Suse and decided to format the external drive to FAT32 since that seems to be the format most compatible with both systems. As Iā€™ve learned, my system is glitched in such a way that any changes I make to ownership, permissions etc donā€™t take unless I am actually in a root session. So I logged in as root, partitioned the drive to FAT and tried to change all the permissions and ownerships. That worked with ā€œownerā€ and ā€œusersā€ but not with ā€œothersā€. It amazes me that even when logged in to a root session (how much more ā€˜rootā€™ can you get?!) I still have ā€œpermission deniedā€ messages popping up. Anyway. I figured that giving ā€˜ownerā€™ and ā€˜usersā€™ read/write/execute permissions was good enough.

After I did all that, I logged out and back in as my normal user and I thought the problem was solved because I was able to read/write/execute on the drive in both linux and windows (though the drive is schizophrenic in windows, mounting as two different drives simultaneously). So while it was a bit iffy, I thought the problem was solved.

Now, I will have to explain *WHY *I am doing all of this in the first place.

Basically, the external drive is for all my music and image files, which I need to access from both machines. I figured the most elegant solution would be to have this shared drive. Well, after I thought Iā€™d solved the problem, I loaded all my music files back on the drive and then tried to access them with Amarok (Iā€™ve loved amarok ever since I first used it. I really feel it is a superior player, despite its big footprint). Didnā€™t work. It couldnā€™t see any of the files. I was able to navigate to the mp3s and open them with Konqueror which would shoot them over to Amarok one at a time, but thatā€™s just not going to work for me.

(i wonder if the reason Amarok canā€™t find my files is because I was unable to set the ā€œothersā€ permissions for the drive to full permissionsā€¦ ?)

So I am open to suggestions.

Malcom, If you still think itā€™s fstab, Iā€™ll try that.

Swerdna, you have a good point. I think I just need to stick to a file system till it works. Any suggestions? (fat32 seems to be the best in terms of compatibility)

thanks again for all the help. :smiley:

Fat32 has a limit on file size of about 4Gb, is that a problem?

Swerdna:

What exactly does the 4gb limit mean? The FAT drive that I partitioned using YAST does work on my linux machine and it has about 45 GB in it. Who knows how long it will continue to workā€¦ I feel like my system, at the moment, is being held together by scotch tap and chewing gum!

Now itā€™s just a problem with Amarok not being able to read the drive. Iā€™m not sure what would cause this. It has been able to read the drive in the past (though it couldnā€™t write to the drive - the problem I was originally trying to solve!)

It means that files larger than 3.8 or something like that in size arenā€™t able to be stored on a fat32 drive unless special software is installed to break them to save thenm and to put them back together to read them.

If you want files to be available to windows in a networking situation you can use any filesystem like ext3 or ntfs or fat32. If you want files to be available to windows in a multiboot situation then ntfs is better than fat32 and quite manageable ā€“ also in multiboot you can use ext3 by installing the ext2 driver in windows to read it (which I havenā€™t used myself). If windows isnā€™t an issue then ext3 is the best IMHO. Ext3 will not allow to belong to anyone but root ā€“ but root can be made a figurehead owner and in fact the entire drive can be given to a normal user with normal ownership by simply installing one directory on it from which do branch all the directory tree/s for the designated owner.

??

Swerdna:
Ok. That makes sense. I canā€™t imagine Iā€™d ever had a file larger than 3.8 gb.

NTFS was the format I tried first. No matter what I did, I was never able to solve the permissions and access issue with the ntfs format. I had abandoned that as a possibility. The forums kept telling me that linux has compatibility issues with an ntfs drive. Maybe I wasnā€™t doing something rightā€¦ I guess if I can figure out how to make NTFS fully compatible with both systems, that would be a good choice.

I tried the ext3 option. I downloaded some freeware that would allow windows to be able to access an ext3 drive, but I could only read the drive, I couldnā€™t write/execute.

What I need is the filesystem that is the most compatible with linux and windows together. I need to be able to freely write/read/execute to the drive from either operating system without having to jump through hoops. The files are mostly mp3s, so theyā€™re large, but not larger than 3gb.

The FAT format that I currently have on the drive is sort of working. I can read/write/execute from either system, but windows has a lot of trouble safely unmounting the device and Amarok in Linux canā€™t seem to scan the drive to read my mp3 files - the main reason I did this in the first place was so that Amarok could view all my MP3 files.

So, ultimately, I need a system that allows me to share files between the two osā€™s on the external drive. However I do that doesnā€™t really matter to me. What would you suggest?

There may be something else to consider hereā€¦how is the drive connected to your comp? USB? Firewire? Network? The latterā€¦IE, you have a Windows machine and a Linux Machine? Who makes the drive? Is it something that may just need a driver? Is it a drive that may have compatability issues? Is it a standard HDD in a portable chassis? IE it is a seagate barracuda in a USB chassisā€¦FSTAB would be a great place to start. Here is what I do when I am playing with FStab or any sys file such as this. You reinstalled the OS so your FStab should be clean (no big changes), make a copy of your FStab and place it somewhere where you can find it. This will also give you a reference side by side of changes that you have made and what to change back if neededā€¦if all goes south and it ROLFS, just replace with original FStab, reboot. Seems to me somewhereā€¦not at comp right nowā€¦at workā€¦seems to me there is a hardware list, I believe in YAST it is Sysinfo. You might see if it is even showing up there. Then if it is USB, you might check to see if any other USB devices get picked up by the device manager.

I guess the format manager sees the drive, which (chime in guruā€™s) I think means that it is probably mounted, format to EXT3 call it whatever it suggests unless this conflicts with your WIN or Linux drive designationsā€¦then if the formatter doesnā€™t work (I knowā€¦again) then remember what you called it and begin hacking FStab. Try copying the line for the Linux system drive and change the label. (REMEMBER TO MAKE A COPY OF ORIGINAL FSTAB) Save that. Reboot and see what happens.

Maybe that might get you somewhereā€¦

L8R
Rich

After hearing you ion the topic a few times, Iā€™d suggest ntfs, a fine and advanced filesystem. If you donā€™t often change the configurations of the other drives it will always appear as the same device, e.g. sdb1, regardless of whether you connect it before or after the computer is switched on. You can take advantage of that and have a script file that you click to mount it with world-writeable permissions (drwxrwxrwx) whenever you attach it.

Does that suit?

I share your pain!

I found that you have to create a folder in the root of the drive using root, then change the permissions of that folder to rw for all, 777 I think (I never remember those numbers!).

Then a normal user can create/delete files and folders inside that folder.

Something like this:

/media/usbdrive/files/beyond-this-point-all-can-read-and-write

For some unknown reason you canā€™t write to a root folder of a drive unless you are root. Security thing I guess, but bloody annoying in the case of USB drives!

This is under a reiserFS formatted drive, not sure about an NTFS or FAT drive though.

openSUSE has problems with ntfs-3g unfortunately, thatā€™s why I re-formatted my USB drive as reiser, plus it gave me way more space than NTFS :D.

Hope that helps.

@theprinciple
Iā€™ve got a great and simple instant fix for you. Use NTFS and in openSUSE 10.3 or 11.0 you execute a one-time setup command to create a link that replaces the normal driver for automounting ntfs (restricted permissions) with the ntfs-3g driver for automounting ntfs (world-writable). Thereafter when you plug in a usb drive with ntfs filesystem it will automount as world writeable with permissions drwxrwxrwx.
The one-time command is to open a terminal and enter this:

sudo ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs

That should end your quest.

Thanks to all for your continued support!

@sosaudio1
You have some good points. I have Linux and windows on separate machines. The drive is an external, portable Western Digital USB 120gb.

Making a copy of fstab is definitely a good idea. I had to reinstall Suse because I screwed up fstab.

Iā€™ll look for that hardware list. Thanks

@wehrmacht
Interesting. I never tried creating a permissible folder on the drive in which I put everything. I might try that. I also didnā€™t realize that suse has problems with ntfs3g. Good to consider.

@Swerdna
What do you think about the possibility that ntfs3g might have issues on OpenSuse? If we can get past that, your solution looks pretty good. Do I need to install ntfs3g or does it come standard with suse 10.3?

I donā€™t know of real issues with ntfs-3g.
If compatibility is no issue I would use a directory owned by me, and group=users, in the root of an ext3 filesystem. If compatibility is an issue I would use ntfs-3g with world-writeable permissions. IMHO there arenā€™t other serious contenders for the filesystem (for non-guru Susers).

Ooops, sorry, I didnā€™t make myself clear there :smiley:

When I said ā€œopenSUSE had problems with ntfs-3gā€ I didnā€™t mean that ntfs-3g has problems, I have found it incredibly stable.

More that openSUSE as a distro doesnā€™t seem to like supporting it, ie it isnā€™t enabled as default for some reason, where other distros are.

Swerdnas suggestion is a good one, I ran his command on my system, and will do that from now on :).