1
vote
2answers
151 views

Running a bash script as root prevents asynchronous execution?

The script below get's executed differently if run as a root user. #!/bin/sh gnome-terminal -x sleep 10 echo 'Why must I wait for sleep to finish?' If its run as a regular user, message is ...
6
votes
1answer
148 views

Cannot expand asterisk without proper permission

Can someone explain to me the following? $ ls -ld /temp/sit/build/ dr-xr-s--- 3 asdf qwer 4096 Jan 31 2012 /temp/sit/build/ $ ls -ld /temp/sit/build/* ls: /temp/sit/build/*: Permission denied So ...
0
votes
1answer
529 views

MySql not accessible by root user

I have a local MySql server. It is started as I can access it with my local user like $ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 66 Server version: ...
1
vote
1answer
113 views

How to change permissions from root user to all users?

I created a folder on the command line as the root user. Now I want to edit it and its contents in GUI mode. How do I change the permissions on it to allow me to do this?
3
votes
2answers
461 views

Who is file owner if the file is created using sudo command?

I logged in using my username ravbholua: ravbholua@ravbholua-Aspire-5315:~$ echo $LOGNAME ravbholua I create file named a1: ravbholua@ravbholua-Aspire-5315:~$ echo>a1 ...
1
vote
1answer
281 views

How to prevent users from renaming files while providing write permissions on Linux [closed]

For some special purpose, I want to prevent non-root users of the Linux Server from changing or renaming the filenames. However, they can modify and write to the contents of the file. How to do this ...
3
votes
2answers
112 views

how to initialize `/etc/group`?

After editing /etc/group, How this update starts functioning without restarting the system in Unix? Is there any command we need to run?
1
vote
3answers
316 views

Finding lists of files with specific permissions

I looked into the find command and came up with find . -maxdepth 1 -perm 521 > test.txt to output the permissions to a text file, but is it possible to do it just using, for example, simple ...
0
votes
2answers
295 views

Installing a shell (e.g. zsh) without being system admistrator [duplicate]

Possible Duplicate: how can I use bash as my login shell when my sysadmin refuses to let me change it Say I have rwx permissions to a directory (my home directory). Can I install a shell ...
7
votes
2answers
2k views

Can files be created with permissions set on the command line?

When creating directories, mkdir -m <mode> <dir> provides for creating one or more directories with the given mode/permissions set (atomically). Is there an equivalent for creating files, ...
5
votes
1answer
4k views

Executing a script in zsh - file permissions

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 ...
12
votes
1answer
603 views

Can I restrict a user to use special programs?

Is it possible to add a user and restrict him to run special programs? For example after this user logs in, he can only open Firefox to use Internet and no other programs can be run by this user. For ...
2
votes
1answer
3k views

How to change permissions of multiple files found with find command?

I have a directory with numerous files. Part of the files have the 755 permissions and the other part have 644 permissions. I'd like to convert the files with 755 permissions to 644. I have tried the ...
2
votes
1answer
571 views

using Set uid to run a root command from non-root user

Consider the following two files. summarize's executable UID bit has been set, so that another user belonging to another group can execute the summarize executable that uses the customers.dat file. ...
2
votes
2answers
2k views

.sh file cannot be executed without explicitly calling sh

This problem has bugged me so much and I can't find a solution. Sorry in advance if it is a newbie question. Let's say I have a file called run.sh that contains: #! /bin/sh -x x-www-browser ...
5
votes
5answers
224 views

Is there a way to see the permissions of all the intermediate directories of a path..?

I have a file path.. Is there any single command to see the file/directory permissions of all the intermediate directories in the path..?
23
votes
3answers
6k views

Clone ownership and permissions from another file?

Is there a command or flag to clone the user/group ownership and permissions on a file from another file? To make the perms and ownership exactly "like" that of another file?
3
votes
1answer
1k views

Determine if the current user has write permission in a directory

I know you can determine the owner of directory by doing: ls -ld ~/foo | awk '{ print $3 }' You could then compare it to the current user by doing this: if [[ $(ls -ld ~/foo | awk '{ print $3 }') ...
5
votes
4answers
1k views

Selinux is denying access to mysqld

I have a script that dumps a mysql database. It then compresses the file and this gets stored in my home folder by using cron. The problem is I seem to be getting an error message. mysqldump: ...
1
vote
2answers
232 views

Weird executabe behaviour

I have a server machine with ubuntu 9.10. I am trying to put in place an executable, which turns out to be the latest flashplayer (debugger version). Somehow the file appears as present and ...
4
votes
2answers
4k views

How do I give all the permissions to a file for a single user that's not me?

When I want to grant access to another user to my file, I use chmod 777 file, but if I want to be sure I'm granting permission just for that user, how can I do it? -- update The file is owned by ...
10
votes
5answers
2k views

How do I recursively check permissions in reverse?

There's a command, I think it comes with apache, or is somehow related to it, that checks permissions, all the way down. So if I have /home/foo/bar/baz it will tell me what the permissions are for ...
6
votes
1answer
2k views

how to view a directory's permission

What is the command with which you can directly view the permission bits of a directory?
41
votes
5answers
3k views

Redirecting stdout to a file you don't have write permission on

When you attempt to modify a file without having write permissions on it, you get an error: > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission ...