root can do everything, others (with userid != 0) can’t do anything. But anyone who has write access to the containing folder is allowed to delete the file. The owner can of course always change the flags and regain access anytime.
greybox:~ septi$ touch foo greybox:~ septi$ chmod 000 foo greybox:~ septi$ ls -l foo ---------- 1 septi staff 0 Apr 8 12:28 foo greybox:~ septi$ cat foo cat: foo: Permission denied greybox:~ septi$ sudo ls -l foo Password: ---------- 1 septi staff 0 Apr 8 12:28 foo greybox:~ septi$
Related Posts:
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- Given two directory trees, how can I find out which files differ by content?
- Diff command along with Grep gives “Binary file (standard input) matches”
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- dquote> result of a execution a program in linux shell
- Command to change the default home directory of a user
- What does “&” at the end of a linux command mean?
- Syntax error near unexpected token ‘then’
- What are the uses of the exec command in shell scripts?
- What does ‘set -e’ do, and why might it be considered dangerous?
- Meaning of “! -S” in shell script
- “No such file or directory” but it exists
- How do I pause my shell script for a second before continuing?
- How do I split a string on a delimiter in Bash?
- Why does ENOENT mean “No such file or directory”?
- sudo: npm: command not found
- In the shell, what does ” 2>&1 ” mean?
- How do I grep recursively?
- How do I grep recursively?
- Ubuntu says “bash: ./program Permission denied” [closed]
- Should I put #! (shebang) in Python scripts, and what form should it take?
- Should I put #! (shebang) in Python scripts, and what form should it take?
- What is the meaning of *nix?
- In the shell, what does ” 2>&1 ” mean?
- How do I copy a folder from remote to local using scp?
- How to concatenate string variables in Bash
- -bash: syntax error near unexpected token `)’
- An example of how to use getopts in bash
- How to kill a process running on particular port in Linux?
- How to delete from a text file, all lines that contain a specific string?
- How do I grep recursively?
- How to mkdir only if a directory does not already exist?
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to perform grep operation on all files in a directory?
- How can I check if a directory exists in a Bash shell script?
- How do I iterate over a range of numbers defined by variables in Bash?
- OS X: equivalent of Linux’s wget
- How to set ssh timeout?
- commands not found on zsh
- subprocess.Popen(): OSError: [Errno 8] Exec format error in python?
- How to substitute shell variables in complex text files
- sudo: apt-get: command not found
- How do I iterate over a range of numbers defined by variables in Bash?
- Why do people write #!/usr/bin/env python on the first line of a Python script?
- How to mkdir only if a directory does not already exist?
- OS X: equivalent of Linux’s wget
- Using find to locate files that match one of multiple patterns
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- SSH using python script
- Curl command for https ( SSL )
- “unary operator expected” error in Bash if condition
- How can I exclude directories from grep -R?
- How to exclude a directory in find . command
- What does “-ne” mean in bash?
- “sed” command in bash
- How can I exclude directories from grep -R?
- Is there a Python equivalent to the ‘which’ command
- How to exclude a directory in find . command
- How to generate random number in Bash?
- Shell command to tar directory excluding certain files/folders
- How to check if a variable is set in Bash?
- Argument list too long error for rm, cp, mv commands
- Difference between using “chmod a+x” and “chmod 755”
- Pseudo-terminal will not be allocated because stdin is not a terminal
- How can I compare numbers in Bash?
- Open and write data to text file using Bash?
- How to cat <
> a file containing code? - How can I kill a process by name instead of PID, on Linux?
- Extract file basename without path and extension in bash
- Which characters need to be escaped when using Bash?
- Shell script “for” loop syntax
- Pseudo-terminal will not be allocated because stdin is not a terminal
- How do I set a variable to the output of a command in Bash?
- What can cause a “Resource temporarily unavailable” on sock send() command
- python getoutput() equivalent in subprocess
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- ./configure : /bin/sh^M : bad interpreter
- How to download a file from server using SSH?
- What is the $? (dollar question mark) variable in shell scripting?
- Is there a TRY CATCH command in Bash
- Is there a “goto” statement in bash?
- Using sudo with Python script
- how to fix the issue “Command /bin/sh failed with exit code 1” in iphone
- How to read a file into a variable in shell?
- Run a string as a command within a Bash script
- Why should we check WIFEXITED after wait in order to kill child processes in Linux system call?
- Implementing shell in C and need help handling input/output redirection
- How to use su command over adb shell?
- What does `set -x` do?
- conditional binary operator expected in shell script
- Is there any simple way to benchmark Python script?
- Block Comments in a Shell Script
- Sorting data based on second column of a file
- Writing a simple shell in C using fork/execvp
- Implementation of multiple pipes in C
- Variable interpolation in the shell
- chmod: changing permissions of ‘my_script.sh’: Operation not permitted
- Using ls to list directories and their total sizes
- Can’t remove a directory in Unix