New answers tagged

0

I think you're missing allow_other on the ntfs-3g filesystem mount. (Required because ntfs-3g is a FUSE filesystem, like mhddfs).


2

If you add this user to the new group recently, note that new groups membership is applied after logging-in again. Command groups gives you available groups in current shell, but groups $(whoami) returns the groups that you will get after re-login. You can also force the sync of the groups using exec newgrp btsync.


3

No. The mount options trump all. That's what they're for: to ensure that nothing ever gets executed directly from that filesystem. To counter noexec, you can run most programs indirectly by invoking their launcher: If the program is a script (starting with a shebang), invoke the interpreter and pass it the script as its first argument. If the program is a ...


0

If you can't login or su to a root user, the two remaining options are Boot from rescue media, and repair the damage Boot from installer, reinstall the system, then restore data from backups


2

cd is builtin command: $ type cd cd is a shell builtin You can't run it via sudo You can use the following command: sudo -i


0

Perhaps the parent directory has acl's that are preventing you from editing it? Try doing this command: sudo setfacl yourname:rwx /usr/java/jboss/standalone/deployments Where yourname is your username. Hope this helps!


0

This seems to have been overlooked: Defaults umask_override which does what was asked (see the sudoers manpage): umask_override If set, sudo will set the umask as specified by sudoers without modification. This makes it possible to specify a more permissive umask in sudoers than the user's own umask and matches historical behavior. If umask_override ...


2

I would go for using ssh and restrict the command(s) that can be run by that user. At least that way you know the connection is secure. You can do so through an entry in /etc/ssh/sshd_config: Match User your_user X11Forwarding no AllowTcpForwarding no ForceCommand your-command arg1 arg2 This might work for you if you, through the arguments, can ...


5

Do not add yourself to the root group, this many have many unintended side effects granting more than you intended. These directories are intentionally not writable by normal users. In the event you need to make manual changes to them (which will be rare), you can perform those operations as root via sudo.


3

If you want to install Python packages from source, you should do so in a virtualenv. That way you minimize the chance that you break your system's python, and it you make it possible to just remove the installed package without fear of removing too much. In order to do so you must first install virtualenv, e.g. using sudo apt-get install ...


0

In Linux system there are two types permissions are available: File Permission Special Permission In File permission we set permission on files and folders: The permissions are: read(4) write(2) execute(1) While in special permission three types of permission are: SUID(4) SGID(2) Sticky Bit(1) In your question you ask what is difference, so ...


0

It may also be possible to resolve with a few lines of code. Unfortunately it's not a completely trivial exercise. The second link below would work if you don't mind it breaking on newlines (or backslashes, apparently?) in filenames. http://superuser.com/questions/139513/acl-and-moving-files-in-nautilus ...


1

I forgot something else. If I can't write to a file, I can still remove it and replace it. And that's exactly the correct way to save a file. (Because you have to fsync() before you have a durable file, which you can safely replace the old one with). It seems to work fine, you just have to ignore the padlocks :). E.g. I can rotate photos copied in by ...


0

The (in 1997) withdrawn POSIX draft ACLs are not able to support the features you get from the Microsoft CIFS. Given that AIX supports modern NFSv4 ACLs that have been modeled after NTFS ACLs, you may like to look at the NFSv4 ACLs.


3

Many operations on directories require execute (search) permission in addition to read permission. chmod 666 clears the x bits, causing strange failures of ls and other basic stuff. Reasonable default permissions might be 644 for files and 755 for directories.


0

Well, I figured it out! Most of the functionality in my home directory relied on the group permission, not just my individual user permission. After I changed the group permission to read / write / create + delete files, everything went back to normal :-) Hopefully this helps someone else out there in time!


2

Yes setfacl should do it. Try the below, does it work ? setfacl -m u:user:--- file Where: -m is to modify the file/directory ACL user is the username for which you want to change permission --- will be the no permissions, replacing r,w,x file is the name of the file for which you want to change permissions


1

When changing a user's groups, the changes don't take effect until the next time the user logs in. So, you can either log out and log back in again or start a new login shell as gefalko: $ groups sys lp wheel optical scanner terdon terdon@oregano ~ $ sudo usermod -a -G www-data terdon terdon@oregano ~ $ groups sys lp wheel optical scanner terdon ## no ...


1

You could create a script to do that backup and either run it automatically via cron or give his user the possibility to run only that script via sudo (if you want it secure, make sure he can only read and execute the script, if he could edit, he could easily get more rights.)


13

There is a little problem with sed's inplace editing mode -i. sed creates a temporary file in the same directory called sedy08qMA, where y08qMA is a randomly generated string. That file is filled with the modified contents of the original file. After the operation, sed removes the original file and renames the temporary file with the original filename. So ...


8

The -i parameter of sed works by creating a temp file during operation, then overwrite the actual file with the temp file in the end. That's the most likely the cause of the problem, since when creating the temp file ownership defaults to myuser:myuser You can set the setgid bit on the parent directory(only if the parent directory is owned by group ...


2

short answer : You can't execute arbirary admin command without either a sudo or being root. long answer : You must either have NOPASSWD in /etc/sudoers, or log as root. (see http://askubuntu.com/questions/147241/execute-sudo-without-password ) visudo then add a line username ALL=(ALL) NOPASSWD: ALL


0

As your output shows, the storage directory is owned by hero and hero is given full access. So this normally means you can do there anything you want, independently of what permissions/owner are set for /opt. I am a bit confused about the error message from your terminal test. You got "file not found". If you have a permission problem, you should get ...


2

/opt is owned by root(admin user), you would need to change the owner to you, or just use the sudo command as below, sudo touch /opt/storage/file.txt Update If adding sudo is not fairly acceptable then change the ownership of folder, use chown sudo chown -R username:username /opt/storage/


0

In most systems, the disc files' default privilege before the umask is applied is the same as regular files. (0666)


3

When determining access permissions using Unix-style permissions, the current user is compared with the file's owner, then the group, and the permissions applied are those of the first component which matches. Thus the file's owner has the owner's permissions (and only those), members of the file's group have the group's permissions (and only those), ...


2

Assuming john does not bear uid 0, john would have no permissions, as john is a member of the group, and the permission check would not consider the world bits because of the group match (source: "Advanced Programming in the Unix Environment", chapter 4, section 5, p. 80 in the first edition.) 642 would result in the 4 bits being applied for the same reason. ...


5

You can't edit the contents of the public directory if you don't have write access. You indicate you are attempting to create a new file. If the test file doesn't already exist in public, touch will attempt to create a new file. It cannot do this without the ability to write to the directory listing to add the new inode entry. Apparently, you don't have ...


0

Regarding the public directory rights, only user root or a member of the group root can write into it . What is configured (drwxrwxr-x) means : user root has read-write-exec rights group root has read-write-exec rights other has read-exec rights Verify that your user is in the root group or give write access to "other" using the command : chmod o+w ...


2

To set the quota for a filesystem: zfs set quota=20TB poolname/backup-filesystem To query the current quota setting: zfs get quota poolname/backup-filesystem Note that quotas can only be set on ZFS filesystems (i.e. made with zfs create pool/fsname), not on subdirectories (made with mkdir). subdirectories of a ZFS filesystem are included within that ...


1

Where is this tracked? How does the gpasswd command know who has been granted elevated permissions? It's not really "tracked", per se. gpasswd has rules for which users have permission to use the command in various ways, and those rules/permissions are tested on every run of the command. The results of those tests are not cached or stored. In ...


0

Since your question has the /cp tag, I'll assume you used cp. From the coreutils documentation for cp: When copying from a symbolic link, cp normally follows the link only when not copying recursively or when --link (-l) is used. This default can be overridden with the --archive (-a), -d, --dereference (-L), --no-dereference (-P), and -H options. ...


0

If the original file permissions started with l rather than -, then they weren't files, they were symbolic links to other files/directories. Whatever command you used to copy them copied the actual files they referred to, not the symbolic links. Only symlinks have an l at the start of the permissions display, normal files start with -. in other words, ...


1

I often use rsync for saving file permissions while copying. rsync [OPTION...] SRC... [DEST] Using the -p option will preserve permissions: -p, --perms      preserve permissions and using -a (archive) will add a few more options: -a, --archive      archive mode; equals -rlptgoD (no -H,-A,-X) See man ...


1

If you call a user script in the users home (editable by the user) with root permissions, that effectively means the user is root. From a security / principle of least privilege point of view, that's a very bad thing to do. Of course, in your case it might not matter. As long as you know what you are doing and what the possible repercussions are, and if you ...


1

This question is primarily opinion, but I'll go ahead and give you mine. In this case, I don't think it could be considered "bad practice", but in a larger (i.e. corporate) environment, it probably would be. On an RPi at home, go for it - if it were a corporate server that I were a co-admin on, I'd have to object to doing so.


1

The only way to accomplish this without resorting to ACLs is, Permissions set to 750 and your username being a member of every other user's primary group. For instance, lets say you have these users: me user1 otheruser /home will look something like this: drwxr-x--- 2 me me 4096 Mar 3 12:14 me drwxr-x--- 24 user1 user1 4096 Apr ...


0

I Wouldn't advice to become a member of all user groups, but have a look at extended ACLs instead. Read about setfacl and getfacl on the web or the man pages and set default ACLs which allow you to enter the other home directories.


-1

You can using apparmor Or better selinux for this porpose By they yiu can garanti just your software have access to the folder Another way is using chattr . But it not safer then apparmor v selinux


0

Apparmor does exactly what you're asking. You can explicitly allow/deny which file firefox can read/write/execute See here for more help



Top 50 recent answers are included