How to mount a volume with file owners being nobody?
ecki at zusammenkunft.net
Tue May 6 18:38:25 UTC 2014
Nobody is no different than any other user, so your test can be done with any files you dont have write access to.
What is a bit different is root-squash, where you are root user, the file system (server) however treats you as not-priveledged. To test this it is best to loop mount nfs.
In all cases you can expect Java APIS like File.isWriteable to lie to you, for many reasons (read only fa, ACL, mac, rootsquash).
Always be prepared to get exceptions on access and handle those proper.
> Am 06.05.2014 um 13:00 schrieb Florian Weimer <fweimer at redhat.com>:
>> On 04/18/2014 05:28 AM, Wang Weijun wrote:
>> I have seen such things before but cannot create one now. I would like to simulate a problematic environment on my own machines. Any suggestion is welcomed, I have Mac OS X and Windows at hand but Linux and Solaris are also OK.
> I'm not sure what you need, but with file systems such as vfat which do not store owner information, you can specify an arbitrary user/group combination at mount (on Linux).
> Florian Weimer / Red Hat Product Security Team
More information about the core-libs-dev