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 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).
I am having a go at setting up my own Apache and can't seem to get my head around the permissions.
Lets say I grab a file from somewhere off the web and it has permission of 600.
I then upload this file via ftp to a user directory, which is also an apache virtual site, and so this file retains this permission of 600.
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
I'm confused about execute file permissions not behaving as I expect. Probably because my expectations are wrong. Anyway:
I have a script file, for simplicity is just called s, located in ~/bin. For the sake of this example, the file contains just the following lines:
#!/bin/zsh
echo "Test";
Very simple.
The /etc/crontab file has the permissions:
-rw-r--r--
I understand that this file is for system cron jobs and other users should not have permission to modify it. The current permissions allows all users read access to the file, enabling them to view the contents.
Is it necessary for all users to be able read /etc/crontab?
Why are Linux file permissions still so primitive and is this likely to ever change?
Each file/dir can only have an owner and group.
I'm trying to change file permissions on a windows server for a domain. It works fine except for one little problem. There is a co-worker that logs in using the same user as mine but on my computer I have full file permissions and on hers the file is read-only. Any help?
I am not able to change file permissions using chmod from the user who owns the file as well as from root. I am using Ubuntu 12.04.
The directory is located on my windows partition, but I have never had the same problem earlier.
Any hints?