All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
1answer
269 views

Recovering from removing execute permission from ld-linux.so

After reading about removing the execute permission from chmod, I got curious. Is it possible to recover from removing the execute permission from ld-linux.so without rebooting if I haven't yet exited ...
-2
votes
1answer
95 views

Permissions to a script in a folder acting weird [duplicate]

I created a script, and I want it to be rwx only by root. All other can only x. What I have now [root@localhost /]# chmod 755 scripts/ -v mode of 'scripts/' retained as 0755 (rwxr-xr-x) [root@...
20
votes
4answers
2k views

What is a valid use case for an “execute only” file permission?

I was reading up on chmod and its octal modes. I saw that 1 is execute only. What is a valid use case for an execute only permission? To execute a file, one typically would want read and execute ...
5
votes
1answer
1k views

How can I recover from a `chmod -x chmod`? [duplicate]

Assuming that you can't reach the internet nor reboot the machine, how can I recover from chmod -x chmod ?
0
votes
1answer
596 views

executable files to normal files via terminal CentOS7

Today I copied some files from the shared folder (Host is a Win7) to my VM ( Guest is a CentOS7). I did this with root permissions. Then I copied th files to my apache location /var/www/html/test I ...
0
votes
0answers
384 views

kickstart does not chmod a file in %post section

I have the following code executed in the %post section of a kickstart file for RHEL 6.6. echo '#!/bin/sh' > /root/add_user echo 'if [ $# -lt 1 ]; then echo "no username provided"; exit 1; fi' &...
1
vote
1answer
418 views

File that is only readable with root privileges

I have a binary file that needs to run at startup on all accounts (including unprivileged user accounts), so a command to run it will be put into /etc/rc.local. The program itself will have only ...
2
votes
2answers
3k views

print the /etc/shadow file in the console

How do I change the permissions of an executable file to access the /etc/shadow file? So far I have the following bash script: #!/bin/bash gcc print.c -o print chmod +s print ./print exit 0 and ...
155
votes
9answers
44k views

How to chmod without /usr/bin/chmod? [duplicate]

Today I was told a tale by a Unix trainer where the root password got leaked to the students, and one of the fellas removed the execute permission from /usr/bin/chmod itself. How do you recover chmod ...
36
votes
4answers
15k views

How to recover from a chmod -R 000 /bin?

And now I am unable to chmod it back.. or use any of my other system programs. Luckily this is on a VM I've been toying with, but is there any way to resolve this? The system is Ubuntu Server 12.10. ...
1
vote
2answers
2k views

Executable located in location A how to run it in location B?

So, I've an executable in my debian server and this executable located in /home/human/ExecuteIt, still i cant figure it out how to run my executable in another location. In my case it is /home/human/...
13
votes
4answers
3k views

vim: create file with +x bit

Is there any way to set +x bit on script while creating? For example I run: vim -some_option_to_make_file_executable script.sh and after saving I can run file without any additional movings. ps. I ...
4
votes
3answers
7k views

Why can't I run programs on another partition in Linux?

So for convenience, I store all my data on my Windows partition so that I can access my data easily from both Linux and Windows. However, I tried compiling a C++ program with g++, and found out that I ...