LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   change permissions from root to usr for ext3 data drive? (https://www.linuxquestions.org/questions/ubuntu-63/change-permissions-from-root-to-usr-for-ext3-data-drive-655552/)

streams &dragonflies 07-13-2008 10:30 PM

change permissions from root to usr for ext3 data drive?
 
hi! I'm sure there is a simple answer...I have a large ext3 data partition (sda6) which I want to use to render and store multimedia files. At installation Ubuntu gave only root read/write access for creating folders and directories. I did some sudo mkdir and managed to move some media files there but when I tried to use the dvd:rip app. I could not get it to operate via that partition.

I was trying to save the following components on the data part. rather than
in the /home default since it is too small for the project.

media/sda6/dvd-rip/dvdrip-data/vob
media/sda6/dvd-rip/dvdrip-data/avi
media/sda6/dvd-rip/dvdrip-data/tmp
and a prompt to choose where to save project as well.

dvd:rip gets stuck at the first step (storage selection)

"An internal exception was thrown!
The error message was:

mkdir /media/sda6/dvdrip-data: Permission denied at /usr/share/perl5/Video/DVDRip/Project.pm line 309"

I'm sure that changing the file permissions for that partition will do the trick. Also I don't understand why a data partition needs root privileges!
I can't figure out how fix this-I want this whole partition to be non-root pls.?!

I'm a bit worried because I want to have a separate /home partition and even was thinking of /usr but I hope I don't to have to root to and from them?!

note: it's on a logical partition not a separate drive- I don't know if having data on a separate drive will make changing file permissions any harder?

Mr. C. 07-13-2008 10:57 PM

There is nothing wrong with changing the permissions for a scratch or data directory. If you want to make it owned by you, or world writable, that's fine. Permissions are available to help, but shouldn't hinder you.

You have choices:

1) give the mounted file system contents your UID and/or your GID
2) make the mounted directory (and all sub directories) world writable

If you want to get into more elaborate schemes, we'll discuss that too.

Btw. the type of partition container is unimportant regarding file systems. And it is file systems that are dealt with at the level we're talking about, not partitions.

uniz 07-13-2008 11:27 PM

There's no mount option for root only access on unix filesystems. Access permissions are embedded in the filesystem itself. To be able to traverse the filesystem hierarchy, sudo chmod -R +x /media/hda6. Then give select dirs world write chmod +w.

jay73 07-14-2008 03:56 AM

Just create a folder for /dev/sda6 called "Data" or whatever. It can be anywhere, even inside your home directory. Then mount /dev/sda6 on it (best to add it to your /etc/fstab as well) and change ownership with sudo chown -R username.username /mountpoint_of_sda6_partition.

comfy hat 07-21-2008 05:40 PM

/-0-0-\
 
I wonder if the advice above paid off with the root-only-access problem.
I've been struggling with this problem too for quite a while, and the big problem seems to be...

hardly anyone has a problem!

The use of umask and so on with fat32 is nice an intuitive, if a little laborious to sort out.

Every piece of manageable advice about ext3 seems to lean towards defaults as the boss option.

It does well enough for nearly everyone, so the fstab entry is clean and simple.

If, as was the case for streams &dragonflies - who is a more experienced forum member than me - if you set your fstab and your extra hard drive up all nicely and your mount point resolutely changes its permissions every time it mounts, you feel very alone.

Streams &dragonflies, if you have fixed your root-only problem, then I am alone.

If you still have a problem, here's a possible common factor.
My secondary hard drive is partitioned to be backwards compatible with Win98, so primary partition is fat32 for active work. First logical drive/partition is fat32 for archived work. Second and final logical drive/partition is ext3 in the hopes that it will cope with files bigger than 4GB (vmware), as per streams &dragonflies' video requirements.

Is this the problem? Once ext3 is held captive inside an extended partition alongside a fat32 partition does it get tense and refuse to allow ordinary users to write?

Perhaps a user group is neessary to create - but I am far from understanding how to do that to an ext3 partition.

Are my suspicions shared, or is 'root-only' a more frequent problem with ext3 than I am gathering from google?

Mr. C. 07-21-2008 06:06 PM

A mounted file system has no cares or concerns about some adjacent partition, or its type. It has no knowledge of that.

I think your testing is flawed, and perhaps there are additional factors that you are not realizing.

comfy hat 07-21-2008 06:49 PM

/-0-0-\
 
Mr C, thank you for your perceptive and valued response.
My experience reflects exactly what you suggest.

My ext3 partition now has every sign of being a useful part of my hard drive, and it may well have happened in part because I changed my approach.

Google, it seems, isn't everything.
I was so tired I looked around LQ, oblivious now to how self-indulgent it is to act out of generalised curiosity. Then, like any classic noob, I found an answer in another thread after having posted here.

Now my ext3 partition works even after a restart.
I hope it will tomorrow, too.
In the other thread, darin3200 described a twofold course of action:

Step 1)intervene manually on the mounting point folder

chmod -R 777 /hd

[I hadn't myself used the -R, and I'd been way, way discouraged when "sudo mount -a" just wiped the permissions & group to root every time I tried mounting the ext3 partition]

Step 2)"and now it works" says darin3200.
That spurred me on to stop this simulated reboot business with "sudo mount-a".
I closed everything down and restarted.
And, well, like darin3200 said: "now it works"!

The restart-driven fstab mount process has not, so far, reset permissions and group to root. I hardly dare believe it.

That LQ thread was called "User write permissions on ext3 partition"
http://www.linuxquestions.org/questi...tition-328413/

I was too narrowly focused on my "root only" problem to be searching for a "user write" solution.
So, I'm relieved to have what seems to be an ok ext3 partition, although lots more left to do.
Perhaps I could have got away with options of just default.

My ext3 partition's /etc/fstab entry is working *in spite* of containing every conceivable ext3 option. If I thought it had any value, I'd include it here, but I think my good fortune was solely due to the conclusion summarised in the "User write permissions on ext3 partition" thread.

I hope the original poster here, Streams &dragonflies, has had a similarly happy result, and thanks for the moral support Mr. C.
Thanks for the time and space, LQ :)

Mr. C. 07-21-2008 08:13 PM

How about learning how the system actually works instead of putting stock into voodoo?

Direct questions about how something works will generally be more fruitful than positing and presumption.


All times are GMT -5. The time now is 05:01 PM.