mount smbfs not working properly after upgrade from 6 to 8

Bug #268536 reported by elatllat
6
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

objective : mount the same SMB share to 2 folders with different permissions.

history: was working before upgrade to v8. Did not find any solutions on the web.

problems:
   1) mounting the same SMB share the second time changes the dmask on the first share.
   2) mounting the same SMB share the second time fails with: folder dose not exist.
   3) mount --bind ignores fmask and file_mode / dmask and dir_mode
   4) chmod is able to change permissions on mounts
   5) files are created with wrong permissions re: fmask

temporary workarounds: ?

solutions:?

origonal example: http://ubuntuforums.org/showthread.php?t=911549

cat /proc/version
Linux version 2.6.24-19-generic (buildd@terranova) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 22:56:21 UTC 2008

Revision history for this message
Ian Weisser (ian-weisser) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

* Is this reproducible?
* If so, what specific steps should we take to recreate this bug?

This will help us to find and resolve the problem.

Revision history for this message
elatllat (elatllat) wrote : Re: [Bug 268536] Re: mount smbfs not working properly after upgrade from 6 to 8

I guess the thing is that smbfs is no longer used cifs is used transparently
instead.
exept it's not transparent at all so all of my old scripts broke disabling
my server.
the original post has all the information I think you might need, but if you
need any specific answers please ask.
I did find 1/2 of a work around but the behaviour is still different.

to reproduce:
1)install ubuntu 6.x
2)have a NAS or some separate SBM share
3)set up a a bash script to mount the share

 -o username=user,password=long-password,fmask=0555,dmask=0555,gid=1000
//ip/share /media/folder

4) upgrade to 8.x
5) it won't work anymore
6) the best fix I can find dose not preserve the original behaviour

please email me any help you can offer

On Thu, Oct 23, 2008 at 1:57 PM, IanW <email address hidden> wrote:

> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. Please answer these questions:
>
> * Is this reproducible?
> * If so, what specific steps should we take to recreate this bug?
>
> This will help us to find and resolve the problem.
>
> ** Changed in: gvfs (Ubuntu)
> Sourcepackagename: None => gvfs
> Status: New => Incomplete
>
> --
> mount smbfs not working properly after upgrade from 6 to 8
> https://bugs.launchpad.net/bugs/268536
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "gvfs" source package in Ubuntu: Incomplete
>
> Bug description:
> objective : mount the same SMB share to 2 folders with different
> permissions.
>
> history: was working before upgrade to v8. Did not find any solutions on
> the web.
>
> problems:
> 1) mounting the same SMB share the second time changes the dmask on the
> first share.
> 2) mounting the same SMB share the second time fails with: folder dose
> not exist.
> 3) mount --bind ignores fmask and file_mode / dmask and dir_mode
> 4) chmod is able to change permissions on mounts
> 5) files are created with wrong permissions re: fmask
>
> temporary workarounds: ?
>
> solutions:?
>
> origonal example: http://ubuntuforums.org/showthread.php?t=911549
>
> cat /proc/version
> Linux version 2.6.24-19-generic (buildd@terranova) (gcc version 4.2.3
> (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 22:56:21 UTC 2008
>

Revision history for this message
Sebastien Bacher (seb128) wrote :

the command line mounting is not a gvfs thing

Changed in gvfs:
status: Incomplete → New
Revision history for this message
elatllat (elatllat) wrote :

who maked it as gvfs?
and why is it not gvfs related?

On Thu, Oct 23, 2008 at 5:10 PM, Sebastien Bacher <email address hidden> wrote:

> the command line mounting is not a gvfs thing
>
> ** Changed in: ubuntu
> Sourcepackagename: gvfs => None
> Status: Incomplete => New
>
> --
> mount smbfs not working properly after upgrade from 6 to 8
> https://bugs.launchpad.net/bugs/268536
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Ubuntu: New
>
> Bug description:
> objective : mount the same SMB share to 2 folders with different
> permissions.
>
> history: was working before upgrade to v8. Did not find any solutions on
> the web.
>
> problems:
> 1) mounting the same SMB share the second time changes the dmask on the
> first share.
> 2) mounting the same SMB share the second time fails with: folder dose
> not exist.
> 3) mount --bind ignores fmask and file_mode / dmask and dir_mode
> 4) chmod is able to change permissions on mounts
> 5) files are created with wrong permissions re: fmask
>
> temporary workarounds: ?
>
> solutions:?
>
> origonal example: http://ubuntuforums.org/showthread.php?t=911549
>
> cat /proc/version
> Linux version 2.6.24-19-generic (buildd@terranova) (gcc version 4.2.3
> (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 22:56:21 UTC 2008
>

Revision history for this message
Andres Mujica (andres.mujica) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in SAMBA.
For future reference you might be interested to know that a lot of applications have bug reporting functionality built in to them. This can be accessed via the Report a Problem option in the Help menu for the application with which you are having an issue. You can learn more about this feature at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
elatllat (elatllat) wrote : Re: [Bug 268536] Re: mount smbfs not working properly after upgrade from 6 to 8

How is this a samba bug is samba is replaced with cfs?
is anyone working on a fix?

update: currently I have a some mounts functioning but only for root and
with completely misleading permissions.

On Mon, Jan 12, 2009 at 7:17 PM, Andres Mujica <email address hidden>wrote:

> Thank you for taking the time to report this bug and helping to make Ubuntu
> better. This bug did not have a package associated with it, which is
> important for ensuring that it gets looked at by the proper developers. You
> can learn more about finding the right package at
> https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug
> as a bug in SAMBA.
> For future reference you might be interested to know that a lot of
> applications have bug reporting functionality built in to them. This can be
> accessed via the Report a Problem option in the Help menu for the
> application with which you are having an issue. You can learn more about
> this feature at https://wiki.ubuntu.com/ReportingBugs.
>
> ** Changed in: samba (Ubuntu)
> Sourcepackagename: None => samba
>
> --
> mount smbfs not working properly after upgrade from 6 to 8
> https://bugs.launchpad.net/bugs/268536
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "samba" source package in Ubuntu: New
>
> Bug description:
> objective : mount the same SMB share to 2 folders with different
> permissions.
>
> history: was working before upgrade to v8. Did not find any solutions on
> the web.
>
> problems:
> 1) mounting the same SMB share the second time changes the dmask on the
> first share.
> 2) mounting the same SMB share the second time fails with: folder dose
> not exist.
> 3) mount --bind ignores fmask and file_mode / dmask and dir_mode
> 4) chmod is able to change permissions on mounts
> 5) files are created with wrong permissions re: fmask
>
> temporary workarounds: ?
>
> solutions:?
>
> origonal example: http://ubuntuforums.org/showthread.php?t=911549
>
> cat /proc/version
> Linux version 2.6.24-19-generic (buildd@terranova) (gcc version 4.2.3
> (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 22:56:21 UTC 2008
>

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information.

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba

Changed in samba:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Thierry Carrez (ttx) wrote :

Which precise version (8.04 ? 8.10) have you upgraded to ? smbfs has been replaced by cifs, so please try to mount your share with cifs instead and report success/failure.

Revision history for this message
elatllat (elatllat) wrote :

The only outstanding problem is the permissions show as -rwxrwSrwx when they should show as -r-xr-Sr-x or -r-xr-xr-x

Thierry Carrez :

cifs is what gave me all the other problems and I think smb is a wrapper for cfs now?

I don't know how to be more "precise" then what I already said: "cat /proc/version
Linux version 2.6.24-24-generic (buildd@rothera) (gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)) #1 SMP Wed Apr 15 15:54:25 UTC 2009" maybe you could tell me how or maybe you missed the first post?

Pedro Villavicencio : here is some DebuggingSamba info for you:

categorie: samba as a client.
Did this use to work properly with a previous release ?:yes.

>dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
libpam-smbpass 3.0.28a-1ubuntu4.7 samba install ok installed
libsmbclient 3.0.28a-1ubuntu4.7 samba install ok installed
samba 3.0.28a-1ubuntu4.7 install ok installed
samba-common 3.0.28a-1ubuntu4.7 samba install ok installed
samba-doc 3.0.28a-1ubuntu4.7 samba install ok installed
smbclient 3.0.28a-1ubuntu4.7 samba install ok installed
smbfs 3.0.28a-1ubuntu4.7 samba install ok installed
swat 3.0.28a-1ubuntu4.7 samba install ok installed
winbind 3.0.28a-1ubuntu4.7 samba install ok installed

How is the remote share accessed from the Ubuntu system?
mount -t smbfs -r -o username=user,password=pass //192.168.1.100/MrSan /media/san

>cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 1.52
Active VFS Requests: 0
Servers:
entry for 192.168.1.100 not fully displayed
 TCP status: 1
 Local Users To Server: 2 SecMode: 0x3 Req On Wire: 0
MIDs:

entry for 192.168.1.100 not fully displayed
 TCP status: 1
 Local Users To Server: 2 SecMode: 0x3 Req On Wire: 0
MIDs:

Shares:
1) \\192.168.1.100\MrSan Uses: 1 Type: NTFS DevInfo: 0x0 Attributes: 0xb
PathComponentMax: 255 Status: 1 type: 0
2) \\192.168.1.100\MrSan Uses: 1 Type: NTFS DevInfo: 0x0 Attributes: 0xb
PathComponentMax: 255 Status: 1 type: 0

>smbclient -L //192.168.1.100
Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.8a-ja-1.1]

 Sharename Type Comment
 --------- ---- -------
 info Disk TeraStation utilities
 MrSan Disk MrSan
 IPC$ IPC IPC Service (MrSan)
 ADMIN$ IPC IPC Service (MrSan)
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.8a-ja-1.1]

 Server Comment
 --------- -------
 MRSERVER MrServer
 MRSAN MrSan

 Workgroup Master
 --------- -------
 WORKGROUP MRSAN

>ls -hal /media/san/Audio/Albums/B/The\ Beatles\ -\ The\ White\ Album\ CD1/ | head -n 4
total 272M
drwxrwxrwx 1 root root 0 2008-07-20 19:58 .
drwxrwxrwx 624 root root 0 2009-05-30 13:39 ..
-rwxrwSrwx 1 root root 18M 2008-07-20 12:32 The Beatles - The White Album CD1 - 01 - Back In The U S S R.flac

>mkdir /media/san/Audio/Albums/B/The\ Beatles\ -\ The\ White\ Album\ CD1/test
mkdir: cannot create directory `/media/san/Audio/Albums/B/The Beatles - The White Album CD1/test': Read-only file system

Revision history for this message
Thierry Carrez (ttx) wrote :

A few notes:
* CIFS does not have fmask/dmask options (that's for -t fat). It uses file_mode and dir_mode. Try those to see if you get better results
* file_mode and dir_mode are only used if CIFS does not negociate CIFS Unix extensions with the server. So if it still returns drwxrwxrwx and -rwxrwSrwx things, my guess is that the Samba 2.2.8a on the server does send weird file modes. SMBFS didn't support negociating those extensions so ended up using the default umask ?

Revision history for this message
Thierry Carrez (ttx) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Revision history for this message
elatllat (elatllat) wrote :

Hi,
By "requested information" I assume you mean "try it with file_mode and
dir_mode".
There is nothing in "man mount" about that so you will have to be more
specific about what you want me to try.
Thanks.

On Wed, Mar 10, 2010 at 11:06 AM, Thierry Carrez
<email address hidden>wrote:

> We'd like to figure out what's causing this bug for you, but we haven't
> heard back from you in a while. Could you please provide the requested
> information? Thanks!
>
>

Revision history for this message
Thierry Carrez (ttx) wrote :
Revision history for this message
elatllat (elatllat) wrote :

Looking back on my original post I did use those options:
mount -t smbfs -o
username=user,password=short-password,dir_mode=0555,file_mode=0555
//ip/share /media/folder

I can't seem to replicate the behavior at the moment (un-commenting old code
dose not have the same effect as before)
I'm assuming it was fixed some time between Aug 20 2008 (v2.6.24-19) and
Jan 28 2010 (v2.6.28-18).
mount.cifs //ip/share /media/folder -o
file_mode=0555,dir_mode=0555,r,username=user,password=short-password
also works.
thanks for the help anyway, feel free to close the bug.

On Thu, Mar 11, 2010 at 7:39 AM, Thierry Carrez
<email address hidden>wrote:

> Those are documented on mount.cifs manpage:
> http://manpages.ubuntu.com/manpages/lucid/en/man8/mount.cifs.8.html
>
> --
> mount smbfs not working properly after upgrade from 6 to 8
> https://bugs.launchpad.net/bugs/268536
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “samba” package in Ubuntu: Incomplete
>
> Bug description:
> objective : mount the same SMB share to 2 folders with different
> permissions.
>
> history: was working before upgrade to v8. Did not find any solutions on
> the web.
>
> problems:
> 1) mounting the same SMB share the second time changes the dmask on the
> first share.
> 2) mounting the same SMB share the second time fails with: folder dose
> not exist.
> 3) mount --bind ignores fmask and file_mode / dmask and dir_mode
> 4) chmod is able to change permissions on mounts
> 5) files are created with wrong permissions re: fmask
>
> temporary workarounds: ?
>
> solutions:?
>
> origonal example: http://ubuntuforums.org/showthread.php?t=911549
>
> cat /proc/version
> Linux version 2.6.24-19-generic (buildd@terranova) (gcc version 4.2.3
> (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 22:56:21 UTC 2008
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/samba/+bug/268536/+subscribe
>

Thierry Carrez (ttx)
Changed in samba (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.