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.

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 :).