PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.03k stars 1.2k forks source link

NFSv4+Kerberos - safeOutputFile.cpp -- Insufficient permissions to write to destination directory #2839

Open bsukhadia-fractal opened 10 months ago

bsukhadia-fractal commented 10 months ago

https://github.com/PixarAnimationStudios/OpenUSD/blob/0b18ad3f840c24eb25e16b795a5b0821cf05126e/pxr/base/arch/fileSystem.cpp#L81

When attempting to perform usdcat from a CLI we are running into the errors: Insufficient permissions to write to destination directory and Runtime Error: in Replace at line 138 of /dependencies-7.0.0-source/USD/working/OpenUSD-23.05/pxr/base/tf/safeOutputFile.cpp.

However, we are able to do touch /fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd/spcInt_01_model_prod_v001.usd

CLI: /fs/shows/tools/gaffer/linux/gaffer-3delight-build/bin/usdcat '/fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/abc/spcInt_01_model_model_prod_v001.abc' -o '/fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd/spcInt_01_model_prod_v001.usd'

Error message: Error exporting "/fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/abc/spcInt_01_model_model_prod_v001.abc" to "/fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd/spcInt_01_model_prod_v001.usd" - Insufficient permissions to write to destination directory '/fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd' Unable to open /fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd/spcInt_01_model_prod_v001.usd for write Runtime Error: in Replace at line 138 of /dependencies-7.0.0-source/USD/working/OpenUSD-23.05/pxr/base/tf/safeOutputFile.cpp -- Insufficient permissions to write to destination directory '/fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd' Runtime Error: in StartPacking at line 2491 of /dependencies-7.0.0-source/USD/working/OpenUSD-23.05/pxr/usd/usd/crateFile.cpp -- Unable to open /fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd/spcInt_01_model_prod_v001.usd for write

Therefore wondering if this section of the code is trying to open the USD file with some change in the permissions for the requested USD file, that's probably not allowed/happening in our NFSv4+Kerberos (sec=krb5) environment, and if that's causing this failure.

Would you recommend a way to handle/fix this behavior without modifying the file-system permission, as that seems to be working for most other file-system operations?

getfacl: Removing leading '/' from absolute path names # file: fs/shows/astro/assets/environment/spcInt/publish/model/spcInt_centerConsole_prod/v001/usd # owner: sshrestha # group: domain\040users user::rwx group::rwx other::---

and since this is a mixed-mode storage with NFS4+Kerberose (sec=krb5) we are able to see below the effective access for the user for the above given path. image

Given the nature of this error/behavior would you suggest any fixes/workarounds that will allow us to get the usdcat working without having to change the permissions?

Thanks,

jesschimein commented 10 months ago

Filed as internal issue #USD-9008

spiffmon commented 10 months ago

@bsukhadia-fractal , I suspect your problems may be similar to those reported in Issue #849 , which we are planning on tackling very soon. If you are Houdini users, you might be able to verify this by seeing if you encounter similar problems writing out USD from Solaris, as SideFX has internally done something very similar to what we are planning on doing.

Cheers