LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   gksudo problem with permissions with usb key (https://www.linuxquestions.org/questions/ubuntu-63/gksudo-problem-with-permissions-with-usb-key-749685/)

enrico_dvchp 08-23-2009 11:58 AM

gksudo problem with permissions with usb key
 
Hi all,
I am an ubuntu 8.04 hardy heron user.
I use to edit files in multiple partitions and drives until now. Especially, I use the command gksudo nautilus. The strange thing is that I can do all I want as root in my linux partition, windows xp partition and also in usb external hd.
But I can only read the second usb storage device 16 GB.
I've tried to change permissions with my root powers by right-clicking a file in the usb key and setting them...but Ubuntu answers me: "The owner couldn't be changed - Sorry coldn't change the permissions of filenale:error setting permissions:read only file system"

I thought that as Root I am able to edit or delete all things but it seems it's not true.
In Windows XP I can use usb keys in the same way I used a floppy disk once. Where is my mistake?
Have I to change my fstab?
This is the current one:
========== fstab =========================
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda5
UUID=5bcb6d93-d4ef-43d7-b01b-bb89e48e5711 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda6
UUID=3e5efeb4-75d3-4d93-abbf-b3154ec0ebe9 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
============================================
Thanks in advance

Enrico

kilgoretrout 08-23-2009 01:42 PM

Is the problem usb drive formatted ntfs and, if so, do you have ntfs-3g installed? It's necessary for write support to ntfs partitions.

enrico_dvchp 08-23-2009 03:09 PM

Quote:

Originally Posted by kilgoretrout (Post 3654643)
Is the problem usb drive formatted ntfs and, if so, do you have ntfs-3g installed? It's necessary for write support to ntfs partitions.

I've cheched with Synaptic ntfs-3g seems to be installed, only libntfs-3g-dev is not loaded. Actually I can write on my ntfs partition. only that damnd pen drive doensn't work properly.

mushroomboy 08-24-2009 09:37 AM

Quote:

Originally Posted by enrico_dvchp (Post 3654748)
I've cheched with Synaptic ntfs-3g seems to be installed, only libntfs-3g-dev is not loaded. Actually I can write on my ntfs partition. only that damnd pen drive doensn't work properly.

Don't need. You can mount with the standard ntfs drivers with rw support but ntfs-3g is preferred. You probably have to find out the script that's auto-mounting your usb devices and change the ntfs to ntfs-3g. You could also remount the usb device manually and then specifiy ntfs-3g.

umount /path-to-usbfolder

mount -t ntfs-3g /dev/usbdevice /path-to-usbfolder

Though I'd find out how to modify the scrip. You could also use fat32 for the usb device, that's the easiest way to transfer files from linux->windows and vice versa.

enrico_dvchp 08-24-2009 10:58 AM

I'll post you the result of sudo fdisk -l in order to have a better view of my system:
-----------------------------
djangou@djangou-desktop:~$ sudo fdisk -l

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa3b4a3b4

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13030 104663443+ 7 HPFS/NTFS
/dev/sda2 13031 36481 188370157+ 5 Extended
/dev/sda5 13031 35525 180691056 83 Linux
/dev/sda6 35526 36481 7679038+ 82 Linux swap / Solaris

Disk /dev/sdb: 4232 MB, 4232839168 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x49e2a461

Device Boot Start End Blocks Id System
/dev/sdb1 1 515 4133375+ b W95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 8, 9)
Partition 1 has different physical/logical endings:
phys=(514, 254, 63) logical=(514, 156, 25)

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5ec40f76

Device Boot Start End Blocks Id System
/dev/sdc1 1 60802 488384512 7 HPFS/NTFS

Disk /dev/sdd: 16.1 GB, 16173236224 bytes
108 heads, 63 sectors/track, 4642 cylinders
Units = cylinders of 6804 * 512 = 3483648 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 4643 15794144+ 6 FAT16
------------------------------
my pen drive is 16.1 size mounted on /dev/sdd1. It seems to be a FAT16 file system. So i think it is not useful to unmount a ntfs disk. For more details I append the "Properties" that appair as i plug in the pen drive.:
Name: 16.2 GB Media
Type: Folder
Contents: 56 items totalling 22.2 GB
Location: on the desktop
Volume: 16.2 GB media
Free space 2 GB
...
Permissions
The permissions of "disk-1" couldn't be determined
...
Volume:
Label:none
size: 15.1 gb
media: removable hard disk
uuid: 4488-3677
file system: vfat (FAT32)
Mount point: /media/disk-1
...
mount options: ro nosuid nodev relatime uid=1000 fmask=0077 dmask=0077 codepage=cp437 iocharset=iso8859-1 shortname=mixed utf8
I hope to help you.
Thanks

mushroomboy 08-24-2009 11:59 AM

Code:

mount options: ro nosuid nodev relatime uid=1000 fmask=0077 dmask=0077 codepage=cp437 iocharset=iso8859-1 shortname=mixed utf8
you might want to have that as mount options rw instead of the ro, though with fat32 you should be able to just use standard defaults. =(

enrico_dvchp 08-26-2009 11:28 AM

Solved but not at all.
I've installed Disk manager and edited partitions in the way i think you suggested, unmounted and mounted again my external disk and now i can delete files and folders but i can' write despite I'm using the ntfs-3g drivers.
These are my current settings for DATA, the usb external disk:
device:
sdc1
mount point: /media/DATA
type: ntfs-3g
And in edit sdc1:
Driver:ntfs-3g (read-write driver)
Mount: /media/DATA
Options: defaults,locale=it_IT.UTF-8 [basic options]
...
Probably i have not set properly the write ntfs option. Have you advice for unskill people?
Gratefully,
Enrico & Verdiani

mushroomboy 08-26-2009 12:30 PM

Code:

/dev/sdb1        /mnt/vista        ntfs-3g        defaults        0        0
/dev/hdc1        /mnt/spare        ntfs-3g        defaults        0        0

If your using ntfs-3g then the defaults should allow read/write... This is what my fstab looks like for my 2 ntfs partitions, and I can create/delete/modify anything I want.

enrico_dvchp 08-26-2009 03:44 PM

Solved::=gksudo prob with permissions for usb storage...
 
Quote:

Originally Posted by mushroomboy (Post 3658535)
Code:

/dev/sdb1        /mnt/vista        ntfs-3g        defaults        0        0
/dev/hdc1        /mnt/spare        ntfs-3g        defaults        0        0

If your using ntfs-3g then the defaults should allow read/write... This is what my fstab looks like for my 2 ntfs partitions, and I can create/delete/modify anything I want.

It was a simpler trik than i've thought... only i had to reboot! I've forgotten that since i used dapper drake after i've done sudo mount -a /dev/sda*, the reboot is necessary to the os in order it identify the system.
Ok... thanks for all.
This is my current fstab, in case someone is interested to the probs i've found.
-----------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
#Entry for /dev/sda5 :
UUID=5bcb6d93-d4ef-43d7-b01b-bb89e48e5711 / ext3 relatime,errors=remount-ro 0 1
#Entry for /dev/sdc1 :
UUID=9E40BBB040BB8D91 /media/DATA ntfs-3g defaults,locale=it_IT.UTF-8 0 0
#Entry for /dev/sda1 :
UUID=F2B4E25DB4E22437 /media/paperino ntfs defaults,nls=utf8,umask=0222 0 0
#Entry for /dev/sda6 :
UUID=3e5efeb4-75d3-4d93-abbf-b3154ec0ebe9 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0


All times are GMT -5. The time now is 10:29 AM.