Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Desktop Environments
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Desktop Environments
Support for your Ubuntu desktop. Including Gnome, KDE and XFCE.

 
Thread Tools Display Modes
Old May 9th, 2007   #1
klausthorn
First Cup of Ubuntu
 
Join Date: Jan 2007
Beans: 10
Question Wrong file permissions: files from USB media

I administer two networks, in both users bring in files on their USB Stcks and cameras. While I'm glad that it works with ubuntu (as opposed to KDE on Fedora which we had before), the file permissions are constantly causing trouble: they are too restrictive, only the owning user has read and write permisisons. The co-workers are always blocked.

When the users get files from other linux or windows machines using scp, nfs or smb as method ("protocol") the system wide settings are honored:

1. set group as the "set group bit" of directories should
2. set read and write permissions for group and set read permissions for "others", as set in "umask=0002"

but when they retrieve the files form USB medium only the owner has permissions to read and write. It's not feasible to call the admin each time and unfortunately it is not feasible to teach them all how to change permsissions with nautilus. There are far too much new users each week to teach them all. Besides they would forget after a few days and it's not a "preference" that only some users want or need. All user need it constantly in the "honor parent dir permission and umask"-Setting. So: How can I change it globally, per ubuntu host?

thanks in advance for caring!
klausthorn is offline   Reply With Quote
Old May 9th, 2007   #2
mlind
Skinny Extra Sweet Ubuntu
 
mlind's Avatar
 
Join Date: Nov 2005
Beans: 2,325
Ubuntu Intrepid Ibex (testing)
Re: Wrong file permissions: files from USB media

hiya, this might not work but it's worth a try

check out file /usr/share/gconf/schemas/gnome-mount.schemas:
Code:
<key>/schemas/system/storage/default_options/vfat/mount_options</key>
        <applyto>/system/storage/default_options/vfat/mount_options</applyto>
        <type>list</type>
        <list_type>string</list_type>
        <default>[shortname=mixed,uid=,utf8,umask=077,exec]</default>
.
.
These are systime-wide settings how gnome-mount will handle external FAT mediums, like USB sticks with FAT filesystem.

You can test this locally first, by editing local gconf key /system/storage/default_options/vfat.
__________________
Building on Ubuntu using [pbuilder]
Other resources [Upgrading from CVS, Gaim2, Anjuta, Rhythmbox]
mlind is offline   Reply With Quote
Old June 28th, 2007   #3
jazzgossen
Quad Shot of Ubuntu
 
Join Date: Jan 2006
Location: Örebro, Sweden
Beans: 404
Re: Wrong file permissions: files from USB media

I just tried this solution. I commented out the old <default> line in /usr/share/gconf/schemas/gnome-mount.schemas, using <!-- --> syntax. Is that correct? And then I changed the default options to what I want. But when I open up gconf-editor as my local user, and navigate to /system/storage/default_options/vfat, the old defaults are still listed there. I could not find anything in ~/.gconf that should override the settings. Do I need to re-login or something for this to take effect?
jazzgossen is offline   Reply With Quote
Old June 28th, 2007   #4
mlind
Skinny Extra Sweet Ubuntu
 
mlind's Avatar
 
Join Date: Nov 2005
Beans: 2,325
Ubuntu Intrepid Ibex (testing)
Re: Wrong file permissions: files from USB media

Quote:
Originally Posted by jazzgossen View Post
I just tried this solution. I commented out the old <default> line in /usr/share/gconf/schemas/gnome-mount.schemas, using <!-- --> syntax. Is that correct? And then I changed the default options to what I want. But when I open up gconf-editor as my local user, and navigate to /system/storage/default_options/vfat, the old defaults are still listed there. I could not find anything in ~/.gconf that should override the settings. Do I need to re-login or something for this to take effect?
yes, I guess you need to relogin. kill -HUP $(pidof gconfd-2) might work too.
__________________
Building on Ubuntu using [pbuilder]
Other resources [Upgrading from CVS, Gaim2, Anjuta, Rhythmbox]
mlind is offline   Reply With Quote
Old June 28th, 2007   #5
jazzgossen
Quad Shot of Ubuntu
 
Join Date: Jan 2006
Location: Örebro, Sweden
Beans: 404
Re: Wrong file permissions: files from USB media

I just tried both logging out and logging back in, and killing my gconf-2. Is rebooting likely to help? I guess it shouldn't.
jazzgossen is offline   Reply With Quote
Old June 28th, 2007   #6
mlind
Skinny Extra Sweet Ubuntu
 
mlind's Avatar
 
Join Date: Nov 2005
Beans: 2,325
Ubuntu Intrepid Ibex (testing)
Re: Wrong file permissions: files from USB media

Quote:
Originally Posted by jazzgossen View Post
I just tried both logging out and logging back in, and killing my gconf-2. Is rebooting likely to help? I guess it shouldn't.
There's a note about default schema locations in /usr/share/doc/gconf2/README.Debian.
It seems that the file you need to edit is actually /var/lib/gconf/defaults/%gconf-tree.xml just search using the vfat keyword and you should find a similar list containing the default mount options.
After editing, killling the gdconfd-2 process makes it reload the schemas.
__________________
Building on Ubuntu using [pbuilder]
Other resources [Upgrading from CVS, Gaim2, Anjuta, Rhythmbox]

Last edited by mlind; June 28th, 2007 at 06:08 PM..
mlind is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry