HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Sep 13, 2008, 01:30 AM
Pedal Power!
lakedude's Avatar
the lake
Joined Oct 2002
1,095 Posts
Discussion
Simple Linux question

I've been using various versions of Linux for years but I'm still a beginner it seems. All my Linux systems have been single disk setups till now.

The latest box has a Raptor boot drive (small/fast) and a 1TB storage drive for movies/shows. I installed Sabayon to the the boot drive and then used Gparted to format the big drive with the XFS file system.

When I try to copy a file to the big drive the operation fails. I believe that the reason is because the big drive has "root" ownership and the normal login it "sabayonuser" (not root).

I've been advised not to login as "root" so how can I write to the big drive?

Can I change the ownership?

I don't want to have to go to SU every time I want to copy a file.

What is the best way to have EASY write access to the big drive?
lakedude is offline Find More Posts by lakedude
Reply With Quote
Old Sep 13, 2008, 01:39 AM
Registered User
College Park, MD
Joined Sep 2002
4,714 Posts
As root:
chmod -R ug+rwx dirname
chown -R username dirname
for some directory you want to be able to write to as a particular user. Avoid doing this for the standard system folders like /, /usr, /etc, /var, /boot, etc. It's best to create a subfolder in say, the /usr folder or whatever partition has a lot of disk space for user data files. You can also mount a partition in an empty folder you create like /data and run the commands I listed above on the folder once mounted.

mount /dev/hdb1 /data

in /etc/fstab:

/dev/hdb1 /data ext3 defaults
thunder1 is offline Find More Posts by thunder1
Reply With Quote
Old Sep 13, 2008, 02:09 AM
Pedal Power!
lakedude's Avatar
the lake
Joined Oct 2002
1,095 Posts
Quote:
Originally Posted by thunder1
As root:
chmod -R ug+rwx dirname
chown -R username dirname
for some directory you want to be able to write to as a particular user. Avoid doing this for the standard system folders like /, /usr, /etc, /var, /boot, etc. It's best to create a subfolder in say, the /usr folder or whatever partition has a lot of disk space for user data files. You can also mount a partition in an empty folder you create like /data and run the commands I listed above on the folder once mounted.

mount /dev/hdb1 /data

in /etc/fstab:

/dev/hdb1 /data ext3 defaults
Thanks for the quick reply.

You have me a little confused talking about all the system folders. The 1TB drive is freshly formatted and completely blank other than the formatting.

It looks like you are having me mount the entire drive as a folder? Interesting, that might work.

The ext3 has me confused too. The big drive is currently XFS although I could easily reformat it to ext3.......
lakedude is offline Find More Posts by lakedude
Reply With Quote
Old Sep 13, 2008, 02:20 AM
Registered User
College Park, MD
Joined Sep 2002
4,714 Posts
When you say formatted, I guess you mean partitioned, or do you mean partitioned and a file system written to it? There are two actual operations involved. The first is to partition the drive with fdisk. The second is to write a file system to the partition with mkfs. Some disk tools combine these operations into a single utility.

http://www.ehow.com/how_1000631_hard-drive-linux.html

But assuming you have the drive partitioned with a single big partition and have written a file system to the partition, you can mount the parition into an empty folder, do the commands I listed and then have access to the mounted drive as the desired user without being root.

Substitute xfs for ext3, or whatever fs you have on the partition in the mount command.
thunder1 is offline Find More Posts by thunder1
Reply With Quote
Old Sep 13, 2008, 02:55 AM
Pedal Power!
lakedude's Avatar
the lake
Joined Oct 2002
1,095 Posts
Quote:
Originally Posted by thunder1
When you say formatted, I guess you mean partitioned, or do you mean partitioned and a file system written to it? .
I don't exactly know. I use Gparted and definitely made a partition. I think Qparted formats too but I'm not exactly sure. Qparted can format, I'm just not sure if it did or not. How can you tell?
lakedude is offline Find More Posts by lakedude
Reply With Quote
Old Sep 13, 2008, 03:28 AM
Registered User
College Park, MD
Joined Sep 2002
4,714 Posts
If you can mount and write to the partition, then you're OK.

fdisk -l /dev/hdb will list the partition information.
thunder1 is offline Find More Posts by thunder1
Reply With Quote
Old Sep 13, 2008, 05:46 PM
Pedal Power!
lakedude's Avatar
the lake
Joined Oct 2002
1,095 Posts
Quote:
Originally Posted by thunder1
If you can mount and write to the partition, then you're OK.
Something weird is going on with my this system. It mostly works OK but it acts a bit strange at times.

I tried re-partitioning and reformatting the big drive but had no luck. Got some weird errors on both the big drive and the system drive.

Also the Firefox dictionary only seems to have some of the most basic words in it??

I guess maybe the question isn't so simple afterall!





lakedude is offline Find More Posts by lakedude
Reply With Quote
Old Sep 14, 2008, 06:39 AM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
So /dev/sda2 seems to have no filesystem? Before mounting the partition, you'll have to create a fs...
daybyter is offline Find More Posts by daybyter
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Simple Slowstick question DaveRCPilot Parkflyers 8 Sep 14, 2002 08:32 PM
A Simple Electronics Question Cajun Electric Plane Talk 8 Sep 06, 2002 10:08 AM
Simple Series Question voyantus Foamies (Kits) 9 Mar 14, 2002 11:40 PM
Simple Zagi Question Coyoteair Foamies (Kits) 2 Jan 22, 2002 12:52 AM
Another Simple 400 question Nose_Dive High Performance 5 Apr 26, 2001 12:41 AM