Eclipse | Permission denied when trying to open sh file under Ubuntu - java

I develop plug-in that works under Ubuntu. The plug-in is required to install a third party software with which it works.
Installation directory is "user home" [System.getProperty("user.home")]
After installation, when I try to open the executable file from this third party software is throwing an exception -
java.io.IOException: Cannot run program >/home/mbaev/Tools/flasher/1.5.0/lua5.1.sh": error=13, Permission denied"
Where should be installed a third party software? Why this directory have permissions by default?

There are probably two reasons:
lua5.1.sh is not executable. You can make it executable by setting:
sudo chmod +x /home/mbaev/Tools/flasher/1.5.0/lua5.1.sh
And then run it:
./home/mbaev/Tools/flasher/1.5.0/lua5.1.sh
If lua5.1.sh is executable but still says error=13, Permission denied. Maybe in this shell some of operations need root permission. Try to run it by sudo:
sudo ./home/mbaev/Tools/flasher/1.5.0/lua5.1.sh

This might also belong to Ask Ubuntu.
Anyway, in order to run a script on linux, you need to have access rights to the directory the script is in, and execute rights set on the script. Most likely you are missing the exec rights.
The command
chmod u+x <myscript.sh>
Will add execute rights for the current user. Try that first.

Related

error=13, permission denied while running a .sh file through automation in eclipse

I am Creating a .sh file newly every time while running automation and while executing that file i am getting permission error always, for time being i am adding permission by running the below command in terminal
chmod u+x "filelocation"
Can someone help me to handle this issue permanently.
As you are always creating the new file, permissions must also be reassigned.
You can run chmod u+x "filelocation" from your code where you created the file to give permissions to the file.
You can reference https://www.mkyong.com/java/how-to-execute-shell-command-from-java/ on how to run shell commands from java using ProcessBuilder.

IntelliJ "Run tests with coverage" is always at 0% and shows an AccessDeniedException

I'm running the elasticsearch gradle project in my IDE.
I'm able to execute tests & debug.
But I'm failing to see any coverage reports.
"AccessControlException: access denied ("java.io.FilePermission" "~/Library/Caches/IntelliJIdea2018.1/coverage/coverage-error.log" "write")
I've attached a screenshot of my IDE.
What you are mission is that when you run chmod 777 on directory, it only changes the permission of that directory only. You also need to change the permissions of the files and directories which are inside of that directory.
For this run the following command to change the permissions recursively for all files and directories:
chmod -R <permissionsettings> <dirname>
Or just change the permission of that particular file to avoid setting permission 777 to all the files.
See this for more information about permissions in linux:

Permission denied when trying to run app engine project locally

The OS MacOS X. Using the terminal, I tried following the steps of how to run a GAE application in a local data store. I dragged the file dev_appserver.sh, located in bin folder afterwards, dragged the war folder of my GAE project.
I get this error "Permission Denied" when I run it from the terminal.
/Eclipse-EE/plugins/com.google.appengine.eclipse.sdkbundle_1.9.15/appengine-java-sdk-1.9.15/bin/dev_appserver.sh
-deploy /Users/myUserName/Documents/workspace/project-name/GAE/war
What could be the problem
Change the Permission u+x to the appcfg.sh file
Note: If you are using Mac OS X or Linux, you must give the command files executable permission before you can run them. For example, to give appcfg.sh executable permission, enter the following command from the appengine-java-sdk/bin/ directory: chmod u+x appcfg.sh
Reference link - https://cloud.google.com/appengine/docs/java/tools/eclipse

Can I do a silent install of the Java JRE without installing the Ask toolbar?

I'm trying to automate the install of a Java 7 runtime on my Windows Server. I can make the install run silently, but the Ask toolbar seems to get installed as well. This enrages me even more than when it prompts during the desktop install.
How can I make it stop? And while I'm at it, is there a way to not prompt for third-party products when doing the regular updates on the desktop?
It's easy! After downloading the executable installer (for example, http://download.oracle.com/otn-pub/java/jdk/7/jre-7-windows-x64.exe), open a command line with administrative privileges, go to your downloads directory, and run the executable with /s SPONSORS=0
For example:
jre-7-windows-x64.exe /s SPONSORS=0
This will not only run a silent installation, but it will bypass any sponsor offers.

studio.sh open permission denied for android studio in ubuntu

I downloaded an Android Studio for linux and then tried to run the studio.sh file inside the 'bin' directory as per the instruction said. The terminal showed an error saying something like this:
bash: ./studio.sh: permission denied
The whole Studio bundle was in .tdz format and I extracted the files before accessing via the terminal. What is the main cause for such error?
Thank you so much!
Got the same problem.
But solved it by following steps:-
Right click on studio.sh and select Properties.
There go to Permissions.
Check "Allow Executing file as program"
And you are done.
Type
sudo ./studio.sh
This should launch android studio with admin privileges. You will need to type your password, assuming you have admin privileges. If you do not have them, you need to contact whoever manages the computer.
When it launches for the first time, it will ask yo to add a shortcut so it is reachable from the GUI app menu. After that, launching android studio should not require sudo permissions.
https://askubuntu.com/questions/421389/where-to-unpack-the-android-studio-file has good recommendations of where to extract android studio to.
You've probably extracted it as root. Change the owner of the file to you with chown command and extract it again, or change the owner of the whole extracted content to you. Example (sudo may be required):
sudo chown yourUserName studio.sh
The other way to do it: change privileges with chmod
sudo chmod a+x studio.sh
Beware, the above one gives every registered user privileges to execute studio script.
--make this--
1°
sudo chown root:YOURUSERHERE /dev/kvm
2°
sudo chmod -R 770 /dev/kvm
so you will be allowed to install and run android studio
Hope this helps :)
I have the same problem, then i used
sudo sh studio.sh
then it`s worked.

Categories

Resources