I installed vs code, python and git bash. I integrated everything.
while printing anything, it's showing PERMISSION DENIED in terminal. Can anyone help how to execute the code.
I believe it's because you need to give yourself permission to execute the file.
Refer to this post: sudo open -e ~/.bash_profile Permission denied mac
Hope this helps
Related
I am trying to use a tool from Openai (train a data model).
I installed openai and now try to execute this command:
/Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai tools fine_tunes.prepare_data -f /Users/finnborchers/Desktop/Code/GPT3_Training_data/training.jsonl
I get this error:
zsh: permission denied: /Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai
I had the same problem from this article, but now I am stuck:
openai command not found (mac)
I am new to the terminal commands, but here is the output of echo $PATH:
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/finnborchers/Flutter_api/flutter/bin
To allow execution I tried this command:
sudo chmod +x /Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai
But then nothing happens (There is no feedback message) and I still get the permission denied message.
Maybe the chmod did not work because of the PATH?
I am thankful for any help!
Solution: I had to run the first installation with sudo.
I am pretty new to the Ubuntu environment and I have a question regarding the solution to "permission denied" error.
When I am trying to run the following command that executes a shell script and writes the result into a txt file, I get the permission denied error.
./test_image.sh > testCase.txt
I know that I can just sudo run the command, but I am hoping to do this command through a Java program and was wondering if there would be a way to give permission to any user that is trying to run this command.
Thank you in advance!!
Why do you have permission deny error? Maybe you need to give your script rights to execute (eg. chmod +x test_image.sh) or give the user rights to write/change testCase.txt in a given directory. I am afraid you need to learn a bit about standard permissions or even ACLs, Selinux policy, setuid, sticky bits, etc.
Im trying to convert a kivy app to run on iOS and have followed the information on the kivy site. However, once everything is downloaded the first step is to compile the toolchain process, which I cant do. So the command
./toolchain.py openssl kivy
returns
./toolchain.py: Permission denied
No other messages so a bit difficult to troubleshoot. I found this post. That suggestion hasn't been accepted or marked as correct, but I tried anyway and changing permissions doesn't fix the problem. I have tried
chmod a+x toolchain.py
sudo chmod 755 ./toolchain.py
sudo chmod 755 ./toolchain.py
All of which change the permissions as expected but trying to run toolchain now gives me
from: can't read /var/mail/kivy_ios.toolchain
./toolchain.py: line 4: syntax error: unexpected end of file
So changing permission doesn't seem to work either and I'm now out of ideas???
Also for info I'm running kivy in a venv on Catalina
So - it turns out after updating XCode you have to reselect the command line tools. Then it all works fine.
This answer is for future users. If any of the above answers don't work.
Use this https://pypi.org/project/kivy-ios/ and follow all the instructions
Noob question, but hear me out
So I installed rclone word-for-word according to this (https://rclone.org/install/)
However, when I got around to rclone config the terminal returned 2020/02/28 11:37:29 Failed to load config file "/home/myUser/.config/rclone/rclone.conf": open /home/myUser/.config/rclone/rclone.conf: permission denied
In an attempt to fix this I ran chmod u+x "/home/myUser/.config/rclone/rclone.conf" which returned chmod: changing permissions of '/home/myUser/.config/rclone/rclone.conf': Operation not permitted
Then I ran the same command prefixed with sudo which seemed to work. Yet after running rclone config again the same permission denied error appeared. What should I do? What did I do incorrectly during install? I just want to be able to run rclone config without having to use sudo.
Unrelated side note I had a similar experience with Anaconda in which I can't run the command for opening the program without sudo but as I ran the command with it the launcher appears with an error message which I can't remember exactly but it ran along the lines of: "Cannot run in sudo mode, please do it again in user mode." Funny Catch-22 if you ask me. I ended up uninstalling it.
Solution: set the permissions of rclone.conf to chmod 777. I changed the whole folder and its files using sudo chmod -R 777 /home/myUser/.config/rclone/ for good measure. Now I can finally retry installing Anaconda.
I've recently installed backup manager onto my ubuntu machine to have automated backup going. The problem is when I go to set up the automatization using this code -
it comes us up saying this "bash: /etc/backup-manager.sh: Permission denied"
I do not understand this error. I've tried change the user who read/writes to someone other than root and that didn't work. I tried changed the chmod number from 770 to 700 and still didn't work.
any info on this is welcome. Thank you to those who help :)
those wondering I am using this tutorial giving to me by the host. https://documentation.online.net/en/dedicated-server/tutorials/backup/configure-backup/start
I'm using the desktop version of ubuntu 16 incase that is needed
The sudo doesn't do what you want in this case. What happens is that the shell evaluates the redirection and attempts to open the /etc/backup-manager.sh for you before the sudo cat even gets started. That fails because the shell still runs as you unprivileged user. You have to say sudo -i to open a new root shell, execute the commands and exit again.
Alternatively you could try sudo nano /etc/backup-manager.sh and paste the contents there. This would work because the editor is run as root and does the file opening itself when you save.