Hot answers tagged permissions
12
The reason you can't to this is simple and two fold
1: cd is not a program but an in-built command and sudo only applies to programs.
sudo foo means run the program foo as root
sudo cd /path returns
sudo: cd: command not found
because cd is not a program.
2: If it were possible to use sudo to cd to a protected directory then having run the command ...
6
It is because the shell is expanding the ".*" to be ".." or up one directory.
In this case it is best, IMO, to use find
Become root
sudo -i
run find
find /home/$user -exec chown $user:$user {} \;
Change $user to the appropriate user name
In theory, chown should work with the -R and without the wildcard
sudo chown -R $user:$user /home/$user
but I ...
5
Each folder contains a file called ... This file is special in that it points to the directory containing the current working directory. For example:
$ pwd
/path/to/dir
$ cd ..
$ pwd
/path/to
Because you specified .* as an argument, the shell expands this to every file starting with a ".", including ... This means that your operation ran on everything in ...
3
That's because cd is not an executable, it's a shell function to change directory.
If you run:
type cd
your will get:
cd is a shell function
You can use sudo -s to open an interactive shell and then cd to to your desired directory:
sudo -s
cd /var/named
To return back to your normal shell simply hit Ctrl+D.
2
No, the guest session is loaded in to a memory allocated space using tmpfs from pre-defined settings located in /etc/guest-session/skel and limited privileges, ie: a guest session cannot access anyone else's home folders.
When you logoff a guest session or reboot your computer, that temporary session and it's files are erased from memory. Any further ...
2
We are able to run Nautilus with root privileges with
sudo -i nautilus
but we need to be extra careful with what we do then.
Root is powerful and most measures to protect our system from accidents will not work any more. Nobody will stop Root from doing stupid things. There will be no warnings.
So here is my advice to people who need to run Nautilus ...
2
/etc/environment is interpreted during login. So the correct way to see the changes you made to /etc/environment is to logout and login again.
sudo works because it partially emulates login as root (sudo -i emulates the login even more accurately).
source /etc/environment won't work, because source is a shell command that tells the shell to interpret the ...
2
First you need to install Apache 2 and PHP (since you are using index.php)
sudo apt-get install php5 apache2
That will install both apache2 and PHP
That should work after you installed it. Also, you don't need to make index.php executable. It just needs to be readable.
1
I figured out the answer. it turns out to be not Unison related, but has every thing to do with how the NAS is mounted on the local Linux machine.
In /etc/fstab, I used
//192.168.1.61/Volume_1 /mnt/nas cifs defaults 0 0
Now I am mounting using
//192.168.1.61/Volume_1 /mnt/nas cifs \ ...
1
It's also worth remembering that, cd's status as a shell builtin or external binary notwithstanding, sudo works by spawning a new process to run the command specified.
Why is this important? Because the basic execution flow of sudo becomes something very similar to this:
The shell spawns off a subprocess to run sudo with the given parameters
sudo ...
1
You can use ACL and the command setfacl for that.
ACL Entries
ACL entries consist of a user (u), group (g), other (o) and an effective rights mask (m). An effective rights mask defines the most restrictive level of permissions. setfacl sets the permissions for a given file or directory. getfacl shows the permissions for a given file or directory.
...
1
I can see your files with read write permissions JUST for the owner but not to the group or other (world universe).
Try the next in a terminal:
cd /opt/lampp/htdocs/madeTemplet/basicTemplet/_images
sudo chmod 775 * -R
This will provide read permissions for the world universe of users, this way you will be able to see the files without problem when ...
1
sudo mount -t ntfs -o uid=<your user id>,gid=<Your group id> <HDD Device Name> <Target Folder to Mount>
You can get your user id and group id from /etc/passwd file. This is how my user's entry looks like in my /etc/passwd file. First 1000 is my UID and the second 1000 is my GID.
...
1
Handuel's answer is right. If you created the files using sudo, they belong to the root user and you don't have privileges as yourself to edit them. You can check this is the case by listing the directory's contents with ls -l.
If you want to be able to modify them as yourself (your user) you should change their ownership with sudo chown youruser:yourgroup ...
1
Default permissions on the Ubuntu One folder are 775 and should be tied to your user account. Your last chown command is correct to reset the owner to 'frank'.
To reset the proper permissions to the Ubuntu One folders:
sudo chmod -R 775 /home/frank/Ubuntu\ One
sudo chmod -R 555 /home/frank/Ubuntu\ One/Shared\ with\ Me will reset the permissions to ...
Only top voted, non community-wiki answers of a minimum length are eligible


