[shares-admin] Can't share files on Windows partition

Bug #115937 reported by Benjamin Otte (Company)
8
Affects Status Importance Assigned to Milestone
GST
Unknown
Medium
gnome-system-tools (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Steps to reproduce (This is on Feisty):
1) plan to share /media/windows/Stuff
2) open shares-admin
3) select "add"
4) select Path/other
5) in the file selector, navigate to /media/windows, which is the mount point of the windows partition
6) don't find any folder to select

expected of course:
6) be able to select "Stuff"

additional info:
I'm able to ls /media/windows/Stuff fine.
I'm able to navigate to /media/windows/Stuff in Nautilus
GEdit sees /media/windows/Stuff when saving
So everything but shares-admin seems to work fine.

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

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http://bugzilla.gnome.org/show_bug.cgi?id=442120

Changed in gnome-system-tools:
assignee: nobody → desktop-bugs
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Changed in rebuntu:
status: Unconfirmed → Rejected
Changed in gst:
status: Unknown → Unconfirmed
Revision history for this message
Stefan Rehm (stefan-rehm) wrote :

This does not look like an upstream bug.
The error is the result of a permission denied problem, that is caused by debian/patches/22_root_only.dpatch.
This patch temporarilly sets the real AND effective user id to the sudo user id in src/shares/shares-tools.c in function gst_shares_tool_init() while configuring the tool.
After configuration it tries to set both id`s back to 0 but according to the man page of setreuid this call has to fail:
"Linux: Unprivileged users may only set the real user ID to the real user ID or the effective user ID."

The failed call leaves the shares-admin process with real and effective uid of the user while the corresponding gid`s are still set to root.
Those privileges do not fit to the default uid and gid of FAT volumes (root:plugdev).
The problem is therefore not related to FAT volumes but to any directory that does not belong to the user or to group root an is not world readable.

Changing only the real user id did not work (even though the contents of the folder were visible):
"(shares-admin:29384): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed."

So we need to find a proper way of connecting to the right session bus, without permanently dropping privileges.

Revision history for this message
Stefan Rehm (stefan-rehm) wrote :

Forgot to say:
An easy workaround (at least for FAT volumes) would be to add the root user to the group plugdev.

Revision history for this message
sancheztavo (sancheztavo) wrote :

I have this problem in Gutsy Beta, and if I try to share a folder using nautilus, doing:

right click on the folder -> "compartir carpeta" (my gutsy is in spanish, in english it would be "share folder") and it gives me an error dialog that says:

"error accessing 'file:///media/hda2/mp3': Acceso denegado"

Changed in gnome-system-tools:
status: Confirmed → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

not likely to be changed for gutsy now and not an important issue since those can be shared from nautilus

Changed in gnome-system-tools:
importance: Medium → Low
Revision history for this message
sancheztavo (sancheztavo) wrote :

No, those files inside windows (fat or ntfs) cannot be shared using nautilus, at least to me it throws an error message and doesn't share them, and this didn't happen in Feisty

Changed in gst:
status: New → Invalid
Revision history for this message
Stefan Rehm (stefan-rehm) wrote :

This has been implicitly fixed, because the patch that caused the bug has been dropped in favor of policy-kit support.

Changed in gnome-system-tools:
status: Triaged → Fix Released
Changed in gst:
importance: Unknown → Medium
status: Invalid → Unknown
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.