[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Enforcing g+rwX permissions on shared files



Quoting martin f krafft (madduck@debian.org):
> also sprach Christian Seiler <christian@iwakd.de> [2015-04-20 17:37 +0200]:
> > Well, haven't tried this myself, and don't know about the performance
> > (FUSE can be quite slow at times), but you could try bindfs, a FUSE
> > filesystem for creating bind mounts that alter permissions (it's
> > packaged in Debian).
> 
> Interesting pointer, but a quick test and
> http://www.redbottledesign.com/blog/mirroring-files-different-places-links-bind-mounts-and-bindfs
> don't really instill much confidence in the performance aspect of
> things…

Mind you, take the preamble with a pinch of salt. It says:
"Hard links can also make some processes like replacing files that are
the target of a hard link awkward. For example, if you create file A,
create hard link B that points to file A, then copy file C on top of
file A, you'll end up with files A and B not containing the same data."

He must mean move file C, not copy it.

/tmp/testdir $ ls -li
total 16
488682 -rw-r----- 2 david david  6 Apr 20 13:29 file1
488773 -rw-r----- 1 david david 11 Apr 20 13:29 file2
488779 -rw-r----- 1 david david 16 Apr 20 13:30 file3
488682 -rw-r----- 2 david david  6 Apr 20 13:29 fileh
/tmp/testdir $ cat *
file1
file2file2
file3file3file3
file1
/tmp/testdir $ cp -ip file2 file1 
cp: overwrite ‘file1’? y
/tmp/testdir $ ls -li
total 16
488682 -rw-r----- 2 david david 11 Apr 20 13:29 file1
488773 -rw-r----- 1 david david 11 Apr 20 13:29 file2
488779 -rw-r----- 1 david david 16 Apr 20 13:30 file3
488682 -rw-r----- 2 david david 11 Apr 20 13:29 fileh
/tmp/testdir $ cat *
file2file2
file2file2
file3file3file3
file2file2
/tmp/testdir $ mv -i file3 file1
mv: overwrite ‘file1’? y
/tmp/testdir $ ls -li
total 12
488779 -rw-r----- 1 david david 16 Apr 20 13:30 file1
488773 -rw-r----- 1 david david 11 Apr 20 13:29 file2
488682 -rw-r----- 1 david david 11 Apr 20 13:29 fileh
/tmp/testdir $ cat *
file3file3file3
file2file2
file2file2
/tmp/testdir $ 

Also, hard links don't "point" anywhere (which would imply a hierarchy).

Cheers,
David.


Reply to: