OptiX was unable to open the disk cache with sufficient privileges - optix

My program using OptiX crashes with the following error:
OptiX API error 1550: OptiX was unable to open the disk cache with sufficient privileges
Where is this disk cache located, so that I can fix permissions there?

TL;DR:
sudo chmod -R u+rw /var/tmp/OptixCache
The OptiX cache files had been created by another user first, which resulted in this permission error.
When faced with similar situations, using strace can help locate which files are being opened by a binary:
strace -f -e trace=openat <your_binary> <arguments>

Related

Can't save to crontab via SSH, but can when logged in locally

I have a remote headless server (MacOS BigSur 11.3.1). When I log in via ssh (with either the root user or regular user), I am unable to save to the crontab.
When I use the following command:
% crontab -e
I can see a cronjob that I saved when I was logged in locally (not via ssh). After editing and exiting the crontab, I get the following error:
crontab: installing new crontab
crontab: tmp/tmp.1028: Operation not permitted
crontab: edits left in /tmp/crontab.kKYx3tt4c1
While logged into ssh, I have instead tried to edit the crontab with this command:
% sudo crontab -e
To my surprise, the cronjob that I saved when logged in locally is not listed. It is as if it is a different crontab for a different user. In any case, I can't save to the crontab when using sudo either. It gives the exact same error as above.
I have followed the advice of a few internet posts suggesting allowing the cron and sshd executables "Full Disk Access" through the Mac System Preferences. However, the same error persists.
I'm not sure what to try next.
So the issue was solved by giving sshd-keygen-wrapper full disk access. Don't ask me why that needs it, but it is working now. I hope this helps anyone with the same issue.

The web server not permitted for chmod under WSL Ubuntu

I use Ubuntu 18 as WSL and everything was running well. Today I run the apache and started the application. When the app tried to perform chmod() on a file which was submited through form inside the folder project (I use Laravel), I received the following error:
chmod(): Operation not permitted
I have notice that this error happen when I try running chmod() from web server (www-data user). In the cli I dont have problems.
From other posts over the net, I understand that Windows has some changes regarding WSL permissions and drive mounts. But I didnt get answer or didnt succeed to resolve that issue.
sudo umount /mnt/c
sudo mount -t drvfs C: /mnt/c -o metadata
Reference: https://github.com/Microsoft/WSL/issues/3172#issuecomment-389157376
sudo umount /mnt/c
sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000,umask=22,fmask=111
did the trick for me.
Ref: https://devblogs.microsoft.com/commandline/chmod-chown-wsl-improvements/

How to solve permission denied error with react native?

UPDATE:
In terminal I see this file has "-rw-r--r--". What command do I need to run in order to change this to the right permission?
I'm trying to run
react-native run-ios
and I keep getting the error shown below:
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES: permission denied, open '/Users/sharatakasapu/Desktop/projects/albums/node_modules/.cache/#babel/register/.babel.7.2.2.development.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at save (/Users/sharatakasapu/Desktop/projects/albums/node_modules/#babel/register/lib/cache.js:52:15)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
I tried to follow along at why babel stores .babel.json in USERPROFILE path but didn't understand how to use this to solve the problem I have as I'm new to react. Any advice on how to address this?
About this i have seen this issue quite some time ago!
there can be too cases they might sound pretty lame though but bear with me and read!
1: the user profile you are using has no access to the files that are being targeted! or you might not have access to root node Packages! what you can do is
sudo chmod -R 777 /Users/sharatakasapu/{your node module path}
but the solution one seems a little trivial!
2: allowing your present user to read all cache and property files + folders! by doing
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
for more you can follow these links .
for solution 1: stackLink
for solution 2: githubLink
Had the same problem.
This worked for me:
run
whoami to get the current user.
run: sudo chown -R ownerName: /path/to/node_modules
It looks like you have no permission- try this
sudo chmod -R 777 {path}
You can try having a look at these two examples:
https://github.com/bower/bower/issues/2262
Error: EACCES: permission denied
Also try running your terminal as an Administrator if possible.
If you give permissions, your error must no longer be visible.
Generally on a MAC, the command is:
sudo chown YourName:staff /Users/YourName/.babel.json
anyone can move to project inside just move to ios folder there you can find your node module inside that check the path of every script and navigate them in terminal then try to use this command chmod 755 yourscriptname.sh
Note for my future self. An incompatible drive format might be the error:
"Permission Denied" in Node on Linux, when running start-script /w local nodemon/mocha/babel-node
Give permission to the .babel file

Uncaught exception could not be opened: failed to open stream

I hope for your support because i dont understand how to resolve this error.
This is a error screen
Please check if the file at the location can be accessed by you. The file should have user level permission for you to be able to access it.
ls -l /var/www/html/deeplace-visits/var/logs/prod.log
If your user does not have permission then,
sudo chown [user:group] /var/www/html/deeplace-visits/var/logs/prod.log

fatal: unable to start /*/.repo/repo/main.py fatal: [Errno 13] Permission denied - on nfs mounted disk

i am trying to initialize a repo (for yocto development - but it seems to be using the same infrastructure as android).
since I lack space on the OS drive, I nfs mounted another disk (filesystem is ext4 but that probably is irrelevant on the mount-client side).
I try to initialize the repo with the command
./repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dylan
and get the error
fatal: unable to start /mnt/lvm/public/.repo/repo/main.py
fatal: [Errno 13] Permission denied
Permissions are fine on the disk. manually I can do file operations without a problem.
Is it impossible to have the repo on an nfs drive (even at the penalty of slower processing)?
Thank you for your help
You need to download the the source code from CygWin not from windows Git. To be able to do that make sure to include curl in the bin directory of Cygwin, and install python within Cygwin packages. Then repeat the steps you have used before inside cygwin terminal.