Weblog entry #6 for JulienV

How to simply share files?!
Posted by JulienV on Sat 17 Jun 2006 at 17:29
Tags: none.
I have been looking for a simple and working solution to share files locally and accross my local network for a long time now! When I say share, I mean give all users read/write rights on the files of given folders. I first bet on NFS and Posix ACL (of course, no NFS for local shares), and had to wait until a patch was published to make ACL usable on NFS. But I then found this solution was not usable with GNOME because of this bug. When creating or copying a file/folder with Nautilus, the permissions aren't set correctly. This morning, I discovered gnome-user-share which uses WebDAV to give each GNOME user the possibility to share a ~/Public folder. It does its job! I thus tried to implement DAV on my network and played with mod_dnssd to make things easy for my users (and for me at the same time), but, again, I have been disappointed for the following reasons:
  • DAV is very slow in local compared to filesystem
  • The owner of the shared folders has to be the user running Apache. As a consequence, the other users cannot manipulate the files locally through Nautilus, they have to use the DAV share only!
  • Most of the GNOME apps do not deal with dav:// address schemes: for example, in order to open a shared picture in Gthumb I have to copy the picture in my home first
Well, although WebDAV is really powerfull, it is not yet the solution I am looking for. What's the hell should I do to share my files using GNOME?!

 

Comments on this Entry

Posted by Steve (62.30.xx.xx) on Sat 17 Jun 2006 at 17:44
[ Send Message | View Steve's Scratchpad | View Weblogs ]

This might be a naive suggestion, but why not share them via SSH using the "connect to server" option of Nautilus and then choosing "ssh"?

Personally I use sshfs / nfs within my LAN, but I don't need to deal with ACLs

Steve

[ Parent | Reply to this comment ]

Posted by JulienV (86.218.xx.xx) on Sat 17 Jun 2006 at 17:52
[ Send Message | View Weblogs ]

Hi Steve,

The "umask bug" in GNOMEvfs also applies to such connections.

Also, for local shares, it is a bit weird to use ssh ;-)

I forgot to mention that DAV really does the trick for network shares, I do not see any problem with this for the moment.

To avoid the problems of GNOME apps not supporting dav:// addresses, I thought that using davfs2 would be a good idea, but it is not very usable for "standard" users (if a share is mounted by one user, the others cannot access to it, nor umount it, even with the "users" option in fstab).

Cheers,
Julien

[ Parent | Reply to this comment ]

Posted by Anonymous (24.182.xx.xx) on Sun 18 Jun 2006 at 18:28
Have you evaluated using samba? It sounds like you're trying to create a world-read/world-write dropbox where everything is modifiable by everyone. Assuming you've actually thought this through and this is a good solution for you, you could use the "admin users" option on the share... this basically does all operations (in the share ONLY) as root instead of the connected user, if the connected user is in the list of "admin users" for that share.

If this really is what you're doing, be careful. It's not quite as dumb as it sounds, because only the users you've trusted can actually do any damage, and it's limited to the shared directory and its contents, but... be careful.

[ Parent | Reply to this comment ]

Posted by JulienV (86.204.xx.xx) on Sun 18 Jun 2006 at 20:04
[ Send Message | View Weblogs ]

Hi and thanks for your comment,

Samba could be a solution for network shares (which work great thanks to Webdav now), but what for local shares.
What if I want to share my pictures with my girlfriend for examples? If we both want to make changes to files we haven't created (and I cannot ask her to modify the permissions when she uploads new pictures). I thought the default mask of Posix ACL would do the trick... but not with this bug in GnomeVFS!

Cheers,
Julien

[ Parent | Reply to this comment ]

Posted by nan-in (84.139.xx.xx) on Mon 19 Jun 2006 at 12:47
[ Send Message ]
Hi Julien,
what about a (web)gallery. You can login from everywhere and do your job.

Another ideas are:
-------------------
- a content management system - short cms - will do this work.
- a groupware solution ...

a simple way could be a ftp-server ...

If you will do this job with linux, look at freshmeat.net or at www.sf.net.

have a nice day

nan-in

[ Parent | Reply to this comment ]

Posted by JulienV (86.204.xx.xx) on Mon 19 Jun 2006 at 16:56
[ Send Message | View Weblogs ]

Hi,

Pictures was just an example to give the idea

At work, we really need to share multiple files, at home, there are pictures, music, some other documents.

The aim is that is is really to use both for the users and for the "admin" (me)

Cheers,
Julien

[ Parent | Reply to this comment ]

Posted by Anonymous (213.164.xx.xx) on Mon 19 Jun 2006 at 08:51
> I mean give all users read/write rights on the files of given folders.
Do you really need an ACL for this?

[ Parent | Reply to this comment ]

Posted by JulienV (86.204.xx.xx) on Mon 19 Jun 2006 at 17:07
[ Send Message | View Weblogs ]

hi,

How else? (note that I don't want to change the default umask as this would only apply to particuler folders/files)

Let's take an example:

julien@hathor:~$ mkdir foo
julien@hathor:~$ chgrp users foo
julien@hathor:~$ chmod g+rwxs foo/
julien@hathor:~$ touch foo/bar
julien@hathor:~$ ll foo/
total 0
-rw-r--r-- 1 julien users 0 2006-06-19 18:02 bar

And now with the ACL:

julien@hathor:~$ rm -f foo/bar
julien@hathor:~$ setfacl -m d:g::rwx foo/
julien@hathor:~$ touch foo/bar
julien@hathor:~$ ll foo/bar
-rw-rw-r-- 1 julien users 0 2006-06-19 18:03 foo/bar

Now all the users part of the group users are write access to all files created under foo/ (note that it does work well in console, but not through nautilus).

This also applies to new directories created under foo/

julien@hathor:~$ mkdir foo/bar2
julien@hathor:~$ touch foo/bar2/foo
julien@hathor:~$ ll foo/ -R
foo/:
total 8
-rw-rw-r--  1 julien users    0 2006-06-19 18:03 bar
drwxrwsr-x+ 2 julien users 4096 2006-06-19 18:05 bar2

foo/bar2:
total 0
-rw-rw-r--  1 julien users 0 2006-06-19 18:05 foo

Cheers,
Julien

[ Parent | Reply to this comment ]

Posted by daemon (146.231.xx.xx) on Tue 20 Jun 2006 at 12:47
[ Send Message | View Weblogs ]
Let's take an example:

julien@hathor:~$ mkdir foo
julien@hathor:~$ chgrp users foo
julien@hathor:~$ chmod g+rwxs foo/
julien@hathor:~$ touch foo/bar
julien@hathor:~$ ll foo/
total 0
-rw-r--r-- 1 julien users 0 2006-06-19 18:02 bar
But that's just because of your umask. Sure ACL's give you the ability to apply default policy to directories, but changing your umask is pretty easy too...

Laters.

[ Parent | Reply to this comment ]

Posted by JulienV (86.218.xx.xx) on Tue 20 Jun 2006 at 16:56
[ Send Message | View Weblogs ]

That's right, but if you change the umask, the settings apply to all files and directories, whereas with ACL, you can have the same results for particular folders. But anyway, changing the umask is not possible due to this gnomevfs bug (see my initial post).

Cheers,
Julien

[ Parent | Reply to this comment ]

Posted by rob (72.192.xx.xx) on Mon 19 Jun 2006 at 19:12
[ Send Message | View Weblogs ]
When I run into 'cascading complications' while trying to perform some computer related task I fall back to using simpler methods to accomplish the same thing. This gets my job done and allows me time to do more research on the tools I would like to use.

You've been given excellent suggestions by the other posters Julien but with each you have posed a new complication in the task you wish to perform. I must say, also, it isn't at all clear to me exactly what it is you wish to accomplish.

Take a step back, use simple tools (Samba, ftp, ssh) to take care of your needs for now, make a flow chart of the task you wish to perform which will give you time to research other tools that will do the job faster/better.

Just my 2¢ worth.

[ Parent | Reply to this comment ]

Posted by JulienV (86.218.xx.xx) on Tue 20 Jun 2006 at 06:17
[ Send Message | View Weblogs ]

Hi Rob,

Maybe I was not clear enough in my first entry, but be sure everything is clear for me.

I would like not to use a server (ftp, samba etc.) to share files on the same machine (in this case, I talk about my deskop machine - with pictures, music etc.). As for remote shared folders, I found Webdav which works great, except small integration problems with Nautilus.

Cheers,
Julien

[ Parent | Reply to this comment ]

Posted by Anonymous (84.77.xx.xx) on Wed 20 Sep 2006 at 05:37
Hi Julien,

I appreciate a lot your post. I have a similar problem here. I want to share files with my girlfriend locally (same computer) and I am catching this nautilus/gnome vfs bug.

What I have done is the following:

user jaume belongs to groups jaume, home
user anna belongs to groups anna, home

Both users have umask 002, are alone in their primary group and the directory where we share files has the setgid bit and group home. I think this would be the usual way to share something locally in a *nix computer.

And with this, I cath the nautilus bug. My by-passes to this bug (I can't understand why is still opened, seems basic funcionality) I thought the following:
* chmod Startup/cron script
or
* Mounting the directory to share as a vfat partition, which you can mount with umask, owner and group flag.

I don't like any of these, for elegant reason, and the second one because I've got a poor electric service, with cuts, and vfat has no log.

I understand the problem, not like people of the other posts
But I don't understand how you share locally with webdav. Could you explain it to me?

It would be great if you cc. the post to txomix at gmail dot com.

Thanks!
Jaume

[ Parent | Reply to this comment ]

Posted by JulienV (86.213.xx.xx) on Wed 20 Sep 2006 at 05:55
[ Send Message | View Weblogs ]
Thanks for your support :-)

The umask bug in GnomeVFS (well, in reality in Nautilus) was fixed by Josselin Mouette, at least partly fixed[1], as I still have some problems as explained in the bug report. But I am now very optimistic as someone put out a bounty to solve this bug!

As for local WebDAV shares, I have used gnome-user-share but it is quite slow. gshare[4] is quite the same but uses FTP instead of WebDAV.

Cheers,
Julien


[1] http://bugzilla.gnome.org/show_bug.cgi?id=327249
[2] https://launchpad.net/bounties/nautilus-ignores-umask
[3] http://packages.debian.org/unstable/gnome/gnome-user-share
[4] http://packages.debian.org/unstable/gnome/gshare

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search