I have a script (test.sh) on a local server, which when I execute with terminal works fine. The script removes a directory and creates a directory local. Then it connects to a remote server using "ssh -i $private_key .." and copies a file there.
When I execute this script in jenkins with
sh test.sh
it doesnt work. Im getting the following errors:
rm: .. Permission denied
mkdir: ..
I encounter a strange problem on a unix/linux machine:
I'm member of a group, let's call it group A and a certain file (which has a different owner) belongs to group A as well. The permissions of that file are
-rw-rw----
so I'd expect I should be able to open that file, but I am not: I'll get the "Permission denied" error message when I try to look at the file's content (using cat).
root user can write to a file even if its write permissions are not set.
root user can read a file even if its read permissions are not set.
root user cannot execute a file when its execute permissions are not set.
Why?
user$ echo '#!'$(which bash) > file
user$ chmod 000 file
user$ ls -l file
---------- 1 user user 12 Jul 17 11:11 file
user$ cat file # Normal user canno
Possible Duplicate:
Redirecting stdout to a file you don’t have write permission on
I'm quite new to Linux and I have a permissions questions. I'm using Linux Mint.
If I go to /opt and do a $ echo hi > file it says permission denied.
If I try with sudo, like this $ sudo echo > file it says permission denied.
Isn't sudo to execute the command as superuser?
After some play around with rooted devices, I got stuck on the files. Let's say we have a file somewhere in the root folder which I want to read/write from my application.
I am writing a PHP script for a client which will be installed on a server which I do not have back-end access to. I only have access to a particular folder and database.
My script will upload files and create folders. However I get a permission denied error when I try run mkdir() and move_uploaded_file().
I am trying to run a GATE application via jetty web application server in Ubuntu.
I have a file which was saved to a CIFS share from Outlook. The file permissions are 777, so I should be able to read the file from the Linux host the file goes to. However when I try, I get file permission errors (unable to read the file). If I have the root user change the permissions (say from 777 to 775), I am then able to read the file as expected.
I always wondered why rsync tries to transfer a file to a remote location where it has read/execute permissions for the target dir, but no write permissions to create the actual destination file.