PDA

View Full Version : [xubuntu] File permissions on new partition



irishrm
April 14th, 2009, 09:38 PM
I created a new partition on my hard drive which I can mount. I can open files from the partition but can not delete or save to it. The partition is owned by root. Can someone help please Irishrm.

aktiwers
April 14th, 2009, 09:57 PM
sudo chown -R username:username /media/partition/

Should do the trick, where username is your ubuntu username and /media/partition is your new partition/mountpoint

irishrm
April 14th, 2009, 10:38 PM
Thanks for that Aktiwers

irishrm
April 14th, 2009, 11:01 PM
I tried the chowm command but I get the reply that a change of ownership is not permitted. I wonder why?

aktiwers
April 14th, 2009, 11:04 PM
Okay.. Can you give more info on this then?

Post the output of:

df -h

and the command you used?
Also what filesystem the partition is and what version of ubuntu you are running

halitech
April 14th, 2009, 11:07 PM
try this


sudo chown -R user:user /media/partition
chmod -R 755 /media/partition

change user to your user and /media/partition to where the partition is mounted

irishrm
April 14th, 2009, 11:25 PM
Here is the output you requested
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 4.2G 2.5G 1.6G 62% /
varrun 125M 104K 125M 1% /var/run
varlock 125M 0 125M 0% /var/lock
udev 125M 56K 125M 1% /dev
devshm 125M 0 125M 0% /dev/shm
lrm 125M 39M 86M 32% /lib/modules/2.6.24-23-generic/volatile
/dev/sda2 19G 12G 7.4G 61% /media/sda2
/dev/sda6 4.2G 2.5G 1.6G 62% /media/sda6
/dev/sda7 4.6G 269M 4.3G 6% /media/sda7
sda7 is the partition in question.

halitech
April 14th, 2009, 11:29 PM
do you want to just leave it mounted at /media/sda7 or do you want it mounted in your home folder?

irishrm
April 14th, 2009, 11:35 PM
It would be best mounted at media/sda7 if possible so I can access it with other os. Sorry I,m a bit slow with the typing

irishrm
April 14th, 2009, 11:38 PM
I tried the suggestion from halitech still getting operation not permitted.

aktiwers
April 14th, 2009, 11:43 PM
Hmm strange..
What if you run Nautilus as root:

gksu nautilus

And navigate to the drive and right-click , pick properties and change the permission and owner there?

sofasurfer
April 14th, 2009, 11:45 PM
Or, the method that I use, for lack of knowing the proper way, is to right-click-on-the-directory>properties>permissions>folder-access/file-access.

Permissions (ownership) and file access are two seperate things as far as I know. Even root can not change files if the 'file access' setting is set to 'no access'.

Someone tell me if that is correct? I'm still figuring this stuff out myself.

JohnLM_the_Ghost
April 14th, 2009, 11:47 PM
Hmm... usually partition must be mounted with particular User's ID (UID)
It also a bit depends on what filesystem is the partition (like NTFS, EXT3, FAT32 or others).

So what filesystem is it?

halitech
April 14th, 2009, 11:50 PM
It would be best mounted at media/sda7 if possible so I can access it with other os. Sorry I,m a bit slow with the typing

are you going to be dual booting? if so, where you mount things in linux won't affect windows.



I tried the suggestion from halitech still getting operation not permitted.

is the drive mounted currently? Open a terminal and post the output of

sudo mount

irishrm
April 15th, 2009, 12:02 AM
Tried gksu nautilus. All the options are grayed out so that won't work. It seems like a difficult problem and I don't want to take up to much of your time trying to fix it. I use puppy as well and I have no problem accessing it with that. If you have any more suggestions they would be very welcome and thanks for trying.

irishrm
April 15th, 2009, 12:05 AM
I'm slow to keep up. Its fat32 and is mounted with pysdm

irishrm
April 15th, 2009, 12:08 AM
Sudo mount shows
/dev/sda6 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-23-generic/volatile type tmpfs (rw)
/dev/sda2 on /media/sda2 type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/sda6 on /media/sda6 type ext3 (rw)
/dev/sda7 on /media/sda7 type vfat (rw,gid=100)
securityfs on /sys/kernel/security type securityfs (rw)

halitech
April 15th, 2009, 12:09 AM
thats why the commands I gave won't work, they are for linux file systems, not windows as windows doesn't use the same permission system (in fact, it pretty much doesn't use any)

irishrm
April 15th, 2009, 12:17 AM
I formatted sda7 myself for storage mostly. I suppose fat2 was a bad choice. Should I reformat as ext3. I dual boot windows and xubuntu and I am using puppy on cd. All a learning curve.

halitech
April 15th, 2009, 12:21 AM
fat32 or ntfs is the best optoins if you want to access it from windows as well unless you want to get the ext3 tool for windows to allow you to read the partition as windows can't read ext3 naticely but linux can read fat32, ntfs formats

aktiwers
April 15th, 2009, 12:21 AM
Is the partition empty now?

Then why not format it from Ubuntu?

sudo gparted

Find the partition, unmount it and format it. You should be able to use FAT32 fine.

irishrm
April 15th, 2009, 12:29 AM
Thanks for the interest and help everybody. At least I can open files stored in that partition just can't save from xubuntu and I have learned a bit so how bad.

halitech
April 15th, 2009, 12:32 AM
check out the info here: http://www.psychocats.net/ubuntu/mountwindowsfstab#fat32

irishrm
April 15th, 2009, 12:32 AM
Still catching up. I did the formatting with gparted in xubuntu.