[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] About change attributes of symbolic links
From:       Renê <rene () renesp ! com ! br>
Date:       2010-12-03 13:25:52
Message-ID: 1291382752.22472.14.camel () renedesktop
[Download RAW message or body]

Thanks for reply Erik, you were right. In my system (Gentoo with kernel
2.6.36, coreutils 8.5) it works as described by man pages, chmod system
call never changes symbolic link permissions...

NLINKFS works fine with -h flag on chown, it changes the user/group of
symlink, but on sshfs I can still reproduce the chown "issue" described
in my last e-mail... even with -h flag, sshfs changes the file pointed
by the link, not the link itself... but this is a sshfs issue, not
fuse...

PS: I tested this issue on Gentoo and Ubuntu 10.04, both with sshfs
version 2.2.

Cheers;

RenĂª


Em Sex, 2010-12-03 Ă s 08:42 +0100, Erik Larsson escreveu:
> Hi,
> 
> My chmod manpage says:
> "chmod never changes the permissions of symbolic links; the chmod system 
> call cannot change their permissions."
> 
> For chown, my manpage says that the '-h' flag is used to make the call 
> affect the symbolic link itself rather than its target (see manpage).
> Can you reproduce the chown problem with the '-h' flag?
> 
> - Erik
> 
> RenĂª skrev 2010-12-03 04.07:
> > Hello Folks,
> >
> > I have developed a file system to handle symbolic links over file
> > systems that do not support it. Let me explains better... I am using a
> > cloud/distributed storage software (wuala, to be more specific), which
> > file system do not support symbolic links. This is a issue to me because
> > I use unison to syncronize my files, that, of course, contains symbolic
> > links... so I create NLINKFS (http://sourceforge.net/projects/nlinkfs/)
> > with fuse. Actually NLINKFS just stores symbolic links as regular files
> > that contains where the link points to. Most of fs syscalls (unlink,
> > mkdir, rmdir, etc..) it's just pass through... readlink of course, reads
> > the location pointed by the link on the right (regular) file at the
> > original file system.
> >
> > But the problem is when I execute chmod or chown, fuse uses readlink to
> > get the file that symlink points to and than, execute chmod on the file,
> > changing the attributes of the file, not of the link itself. I tought
> > that was something wrong in my code, but bbfs (from fuse-tutorial) and
> > sshfs has the same behavior.
> >
> > Steps to reproduce:
> >
> > 1) Mount some remote dir with sshfs
> > $ sshfs foo@bar:/home/foo mntdir
> > $ cd mntdir
> >
> > 2) On the mounted dir, create some file:
> > $ touch hello.txt
> >
> > 3) Than, create a symbolic link to the file:
> > $ ln -s hello.txt testlink
> >
> > testlink will have 777 permission attributes.
> >
> > 4) Change the permission of the link:
> > $ chmod 600 testlink
> >
> > 5) Now check with:
> > $ ls -l
> >
> > The symbolic link still have 777 as permissions, but the hello.txt will
> > have 600 permission attributes, which is wrong, execute chmod on the
> > link needs to change the link file, not the file pointed by the link.
> >
> > For while, there is a work around that I can do in my code, not in fuse
> > itself?
> >
> > Cheers;
> >
> > RenĂª
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Increase Visibility of Your 3D Game App&  Earn a Chance To Win $500!
> > Tap into the largest installed PC base&  get more eyes on your game by
> > optimizing for Intel(R) Graphics Technology. Get started today with the
> > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> > http://p.sf.net/sfu/intelisp-dev2dev
> > _______________________________________________
> > fuse-devel mailing list
> > fuse-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/fuse-devel
> 
> 
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> fuse-devel mailing list
> fuse-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fuse-devel



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic