"./setup.sh: Permission denied" error - ios

I came across this problem that I am not sure where it's pointing. I have tried looking various sample codes but nothing that matches my problem. If anyone can look into it I will appreciate. The error is:
/Users/TMK/Library/Developer/Xcode/DerivedData/Project-dfuciscypawvmsalewmxognechca/Build/Intermediates/Project.build/Debug-iphonesimulator/Mustage.build/Script-01D7EAEB1DA69C8000FF7607.sh: line 3: ./setup.sh: Permission denied

I guess it is seems like permission issue towards user.
When you trying to work with modified projects and scripts no neccessory of bin/sh any more.
Following are the steps to avoid this error.
Terminal
Go to your script
Run the command chmod 755 your_script_name.sh
Another Way is as below
Suppose myTODO is my project name
Try this chmod a+x "/Users/TMK/Desktop/Your_FolderName/oDesk/myTODO/MyTODO_iPho‌​ne/Pods/Pods-resourc‌​es.sh"
if you not containing some folder hierarchy please avoid it from the given path
Hope this help you

Related

Problem with Jenkins running Robot Framework script

I am trying to automate the execution of Robot Framework using Jenkins.
But when I run Jenkins I am receiving the error "Permission denied". You can see bellow the error's print screen.
Despite several attenpts Im not able to identify where this restriction is.
I have already include the Jenkins user as SUDO user, but the error is still there.
I also applied o CHMOD 777 /home/eduardo/.local/bin/robot but did not solve.
Can someone please tell me how I can identify where this restriction (Permission denied) is.
Thank in advance.

How do I fix ngrok permission denied?

I've installed ngrok and created an alias in my user folder. When I run the following command
./ngrok authtoken tokenhere
I get
./ngrok: Permission denied
Is there somewhere I need to set permissions?
I fixed this by moving the ngrok exe to the /usr/local/bin folder.
I was getting the Permission denied error message because I was running the command from a folder that only had a shortcut to ngrok instead of the actual executable. Silly mistake, but figured I would post in case anyone else does the same thing.
below worked for me:
1)go to ngrok executable file(in my case /tmp/ngrok/ngrok) & give executable permission using chmod +x ngrok
2)go to ./lib/python3.6/site-packages/flask_ngrok.py
3)comment the line os.chmod(executable, 777)
I solved making it executable via chmod -x ngrok

Having issue with installing this in my mac terminal

I cannnot figure out why it's giving me this result.
Warning: Failed to create the file /Users/myname/.bash_profile: Permission
Warning: denied
curl: (23) Failed writing body (0 != 1968)
When I enter the second step see in the link below.
Instructions provided here that I was given from a bootcamp I am learning to code from.
If some one could take the time out their day to please answer my question. I would gladly appreciated.
Try appending "sudo" in the beginning of the command.
If that does not work, attempt to edit permissions for the directory by using chmod.
Be careful with using 777, but if it is on your local device, it should not mean a whole lot.
Usage: sudo chmod XYZ /di/rec/tory
Replace XYZ with chmod settings.
Read this if you are in doubt.

Permission denied in tmp

I just deployed a Rails 3 app with Ruby 1.9.2. I have been getting several errors.
application.css wasn't compiled. so I set pre compilation in production.rb to false;
Then I got: cannot generate tempfile, so I did rake tmp:clear;
And now I get ActionView::Template::Error (Permission denied - /srv/www/appname/tmp/cache/assets): and I haven't been able to fix this one.
Please help.
If the user:group running your web server is http:http and it's running on *nix, do this:
sudo chown -R http:http /srv/www/appname/
Also, silly question, but does /tmp/cache/assets exist?
And, if so, as #leonel points out, you may also need to change the permissions:
chmod 777 /srv/www/appname/tmp/cache
Be careful setting 777 permissions on anything. Only do this to verify a permissions issue, then reset to the most minimal permissions necessary.
Most likely you're running your app under apache passenger.
You have to change the owner of config/environment.rb to somebody who has permissions to your app's folder.
chown -R www-data:www-data /path/to/app
Make the tmp folder of your project writable:
chown -R group:user /path/to/rails/app/tmp
chmod -R 777 /path/to/rails/app/tmp
In your console, run rake tmp:cache:clear
Restart your application.
You probably didn't create your Rails application with the user running the server now. Can you paste the output of ls -alh /srv/www/appname/tmp/cache/assets and tell us the user running the webserver ?
Now for those of us that are using windows
- If you are an administrator and see this error
ActionView::Template::Error (Permission denied # utime_failed) C:/User/..../tmp/cache/assets/sprochets/v3.0/E5/E5PZx-mq8.cache
Then it is Permission and Ownership setting issue on Windows.
You can go to the tmp folder on your application and give yourself(User) permission to **Read, Write and Execute ** on the folder.
Click [here][1] to view how to give permissions.
Quick Fix. Open your terminal and run the following command as an administrator
takeown /f <location of your app tmp folder> /r /d y
Then Restart your server.
I encountered this error recently. Apache was not able to write to tmp directory
cannot generate tempfile
/tmp/RackRewindableInput2xxxxxxxxxxxxxxxxx'
/app-lib/lib/ruby/1.8/tempfile.rb:52:ininitialize'
app-dir/vendor/gems/rack-1.0.1/lib/rack/rewindable_input.rb:73:in new'
app-dir/vendor/gems/rack-1.0.1/lib/rack/rewindable_input.rb:73:inmake_rewindable'
app-dir/vendor/gems/rack-1.0.1/lib/rack/rewindable_input.rb:26:in read'
app-dir/vendor/gems/rack-1.0.1/lib/rack/request.rb:134:inPOST'
I checked permission of tmp directory and it had permission to all groups to write to it.
I changed owner of tmp directory and it didn't resolve the error either.
The culprit was tmp directory was filled with too many large files, and looks like somehow apache didn't had enough space to write this new file.
Cleared all temp and old files. It sorted out the issue.
We need to grant permissions to access the required directory for the system root user
sudo chmod 777 -R your_project_directory_to_be_access
In your case you can use:
sudo chmod 777 -R /srv/www/appname/tmp/
For security reasons, just keep in your mind:
chmod 777 gives everybody read, write and execute rights which for most problems is definitively too much.
I think a better solution without giving everyone manage rights to tmp folder is like that:
sudo rake tmp:cache:clear
This will clear the temp folder and when you run rails server again it won't give error.
In my localhost it gave this error, and the command chmod 777 C:/Sites/project_name/tmp/cache/ solved my problem.
Most probably you gave permission to your app's main folder read and execute mode. However, in order to generate new files from your app, you also need to give write permission for required folder. For example: yUML uses tmp folder for generating files. I gave tmp folder write permission:
chmod -R 777 /usr/share/nginx/html/yuml_product/tmp
solved my problem.

Running system call in rails causes error

When I try to run the following code:
system("pdftk #{##temp_file_path} output #{##file_path} user_pw #{##pass}")
I get this error:
Permission denied - /tmp/billing.pdf
I tried running:
chmod +x /tmp
But that didn't help.
Any suggestions?
What are the permissions on /tmp (you can find this with 'ls -ld /tmp')? Are you trying to create billing.pdf or modify an existing file?
The user executing your rails process probably needs write privilege in addition to execute privilege (which you were adding with the 'chmod +x' command). Also, if there's already a billing.pdf file in /tmp, it would need to allow the rails user to read or write it (whatever you're trying to do).
Adding this system call first fixed the problem:
system("chmod +w ##temp_file_path")
For some reason rails pdf-writer plugin generates files as read only.
Maybe it has options to override that. :)

Resources