Tag Info

New answers tagged


Why is this happening: Probably because the permissions (prior to you changing them with "chmod g+rwxs") didn't allow for the group to modify the file. eg. your group only had read permissions, and the (o)ther group didn't have write permissions either... What does "g+rwxs" mean: For the (g)roup add (+) (r)ead, (w)rite, e(x)ecute, (s)UID permissions (as ...


You can do chown username:groupname file ... to change both simultaneously. It's changing two fields in the same (inode) structure so combining it saves two system calls (one for reading the current values and one for setting the modified vaules).


If what you also want is to copy the file somewhere (like its final destination), you might want to have a look at the install command: install -m 0777 -o root $sourcefile $destinationfile


There is concept known as "UNIX-way". Each tool should perform one simple function. If one need a more complex function, he can combine smaller tools. The opposite is the monolitic design when all functionality is aggregated within one huge tool. If you want to do something complex - just write a script, invoking simple tools.


The file mode has no effect on whether or not the owner can chmod a file. $ chmod 000 foo $ ls -l foo ---------- 1 chris chris 0 May 6 13:55 foo $ chmod 700 foo $ ls -l foo -rwx------ 1 chris chris 0 May 6 13:55 foo You probably have bad permissions on the parent directory -- at the very least, your user needs the execute permission set on the directory ...


Either the filesystem is doesn't support setuid executables (because it's mounted with the nosuid option, or because it's a FUSE filesystem mounted by a non-root user), or there is a security framework such as SELinux or AppArmor that prevents setuid here (I don't think Ubuntu sets up anything like this though). That, or you didn't actually run these ...

Top 50 recent answers are included