Tag Info

New answers tagged

2

Colors The coloring is controlled by the DIR_COLORS* files that reside under `/etc. For example on Fedora 19 I have the following 3 files: $ ls -l /etc/DIR_COLORS* -rw-r--r--. 1 root root 5004 Jan 20 2014 /etc/DIR_COLORS -rw-r--r--. 1 root root 5682 Jan 20 2014 /etc/DIR_COLORS.256color -rw-r--r--. 1 root root 4646 Jan 20 2014 ...


1

I like this permissions calculator: http://file-permissions.ninja


19

Ramesh's answer is perfectly accurate, but I wanted to chime in and provide a more in depth explanation of file modes. While numbers like 755 and 777 may seem special and only mean something for file modes, they're actually pretty basic. These numbers are actually octal numbers. Decimal numbers are base-10, hex numbers are base-16, binary is base-2, and ...


19

It's the other way around. It will give rwx permission for others. touch samplefile ls -l samplefile -rw-rw-r-- 1 ramesh ramesh 0 Oct 16 22:29 samplefile Now after I execute the command, I get the output as, chmod 7 samplefile ls -l samplefile -------rwx 1 ramesh ramesh 0 Oct 16 22:29 samplefile From man page of chmod, numeric mode is from one to ...


1

Really all that is needed is to make sure that there is a directory in /mnt/bar that is writable by the influxdb user sudo mkdir /mnt/bar/influxdb sudo chown influxdb:influxdb /mnt/bar/influxdb Only root and influxdb will be able to write to it.


0

If you would like to have the user-influxdb for rw, you can chmod with 755! The disturbing point with 777 is that user has the control over anything in that mount point.


0

For directories and files already created: find /start_directory -type d -exec chmod 755 {} \; find /start_directory -type f -exec chmod 660 {} \; If your users should be able to create new files and/or subdirectories please give more details because a solution depends on exact requirements.


1

Well, just don't set the same permissions on the directory and the files within it: $ chmod g+rx directory/ $ chmod g= directory/* Here, the group members can enter and browse the directory, yet they won't be able to read the files within it. Edit: regarding your new title, I would suggest: $ chmod a+rx directory/ $ chmod u=rwX,g=rX,o= *


0

I normally use the following: find . -type f -print0 | xargs -0 sudo chmod 440 find . -type d -print0 | xargs -0 sudo chmod 555 However, that doesn't take into account executables. I was thinking of doing something like this for files: find . -type f -print0 | xargs -0 sudo chmod ug+r ug-w o-rwx But it's still two commands and I'm not sure if this is ...


0

Pipe the contents of chmod into an already executable file cp /usr/bin/executable_file ~/executable_file cat /usr/bin/chmod > ~/executable_file ~/executable_file +x file_to_be_executed.sh


1

Option 1: The permissions of the files inside the directory doesn't matter, blocking at the directory level is usually enough, so chmod 2750 /path-to-dir is enough. Option 2: Use ACLs only (chmod 2750 /path-to-dir is not necessary, but make things nicer for people not used to ACLs). setfacl -R -b -d -m o::--- -m u::rwX -m g::rX . note that you could set ...


2

Unless it's been explicitly disabled, you can ssh using your root user: ssh root@hostname.com



Top 50 recent answers are included