Bluehost.com Web Hosting $6.95

[Samba] Strange Samba permissions on vfat (fat32) volume

This is a discussion on [Samba] Strange Samba permissions on vfat (fat32) volume within the Samba forums, part of the Networking and Network Related category; I'm running Samba on Ubuntu server. I know, perhaps it is not related with Ubuntu Server 8.04, but ...


Go Back   Usenet Forums > Networking and Network Related > Samba

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-17-2008
Tomas Mackevicius
 
Posts: n/a
Default [Samba] Strange Samba permissions on vfat (fat32) volume

I'm running Samba on Ubuntu server. I know, perhaps it is not related with Ubuntu Server 8.04, but rather
with Samba itself, but I thought perhaps someone has similar
experience...



I have a couple of shares on Samba on a vfat (fat32) volume. As
everybody knows Linux permissions does not work on vfat, except on
mount folder where vfat partition is mounted. I though that is really
not a minus, but a plus if you want to create share for 10-15 users,
because then it's not necessary to mess with all those permissions.



So, recently I have noticed, that I cannot delete some of the files on
that share, even if the share is mounted with fstab option:



/dev/sdb1 /mnt/320gb/disk_c vfat utf8,noatime,umask=007,gid=1003 0 0



I have tried umask=000, but that didn't help either...





Interesting part is that I could delete most of the files, but not those couple.



I compared permissions of the "normal" files and those "bad" ones from
the Windos XP box. Normal files had All permissions available in
comparison with bad files that had only Read-Execute and Read
permissions available. On server permissions looked like this:



Normal file:

-rwxrwxrwx 1 root server1 6158201 1999-05-05 21:36 Alex Gopher - Super Disco.mp3



Bad file:

-r-xr-xr-x 1 root server1 2568192 2001-10-04 16:52 Bjork - All Is Full Of Love.mp3



I realized that some of the "bad" files where copied to vfat partition
from CD drive (when this HDD was still on a windows PC). So the logical
thinking would suggest, that those files have Read Only mark (which is
usually given to all files that are copied from CD). Knowing this I
tried to play with smb.conf options:



delete readonly = Yes

map readonly = No / Yes



I didn't get any results. I tried to change other map options but with
no results either. Permissions were not intact. My Only idea is that
somehow Samba is interpreting Read-Only flag and that affects the file
permissions.



I would really appreciate any comments or ideas. Here are the settings of my share:



[320GB_C_full]

path = /mnt/320gb/disk_c/

available = Yes

browseable = Yes

read only = No

follow symlinks = No

hide dot files = Yes

delete readonly = Yes

case sensitive = No

preserve case = Yes

map archive = Yes

map system = No

map hidden = No

map readonly = No

guest ok = No

oplocks = No

level2 oplocks = No

Thanks to all.




--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #2 (permalink)  
Old 06-17-2008
Michael Heydon
 
Posts: n/a
Default Re: [Samba] Strange Samba permissions on vfat (fat32) volume

Tomas Mackevicius wrote:
> I'm running Samba on Ubuntu server. I know, perhaps it is not related with Ubuntu Server 8.04, but rather
> with Samba itself, but I thought perhaps someone has similar
> experience...
>
>

Actually I don't think it has much to do with samba either.
>
> I have a couple of shares on Samba on a vfat (fat32) volume. As
> everybody knows Linux permissions does not work on vfat, except on
> mount folder where vfat partition is mounted. I though that is really
> not a minus, but a plus if you want to create share for 10-15 users,
> because then it's not necessary to mess with all those permissions.
>

You could achieve the same thing under a fully functional fs and
wouldn't run into problems like this :)
> <snip>
>
>
> Normal file:
> -rwxrwxrwx 1 root server1 6158201 1999-05-05 21:36 Alex Gopher - Super Disco.mp3
>
>
> Bad file:
> -r-xr-xr-x 1 root server1 2568192 2001-10-04 16:52 Bjork - All Is Full Of Love.mp3
>
>

I think this is your problem.
>
> I realized that some of the "bad" files where copied to vfat partition
> from CD drive (when this HDD was still on a windows PC). So the logical
> thinking would suggest, that those files have Read Only mark (which is
> usually given to all files that are copied from CD). Knowing this I
> tried to play with smb.conf options:
>
>
>
> delete readonly = Yes
>
> map readonly = No / Yes
>

That isn't how it works, the map read only maps the client's read only
value to the server's unix permissions, what you are interested in is
how the unix permissions are mapped to the file system's read only flag.
>
> I didn't get any results. I tried to change other map options but with
> no results either. Permissions were not intact. My Only idea is that
> somehow Samba is interpreting Read-Only flag and that affects the file
> permissions.
>

It isn't samba as you demonstrated with your ls output above, it is
occuring at the file system level.
>
> I would really appreciate any comments or ideas. Here are the settings of my share:
>
> available = Yes
>

Default value.
> browseable = Yes
>

Default value.
> read only = No
>
> follow symlinks = No
>

Symlinks can't exist on a fat fs.
> hide dot files = Yes
>

Default value.
> delete readonly = Yes
>
> case sensitive = No
>

Default value.
> preserve case = Yes
>

Default value.
> map archive = Yes
>

Tries to change unix permissions, which wont work on a fat fs.
> map system = No
>

Tries to change unix permissions, which wont work on a fat fs.
> map hidden = No
>

Tries to change unix permissions, which wont work on a fat fs.
> map readonly = No
>

Tries to change unix permissions, which wont work on a fat fs.
> guest ok = No
>

Default value.
> oplocks = No
>
> level2 oplocks = No
>
> Thanks to all.
>
>

None of that should have any effect on the problem at hand, but it is
kind of pointless to define a heap of options to their default value.

*Michael Heydon - IT Administrator *
michaelh@jaswin.com.au <mailto:michaelh@jaswin.com.au>


--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0