Visit Jeremy's Blog.
Go Back > Forums > Other *NIX Forums > AIX
User Name
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.


  Search this Thread
Old 09-28-2016, 04:51 AM   #16
Michael AM
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 121

Rep: Reputation: 33

Originally Posted by astrogeek View Post
Boom! You just shot a four year dead reply to a twelve year dead thread... impressive!
So - let's keep it alive :P

As far as apache, or any program goes - the mods you need are the mods you need.

Some programs such as apache have the idea that using "nobody/nobody" as user/group of the application make it safe - when, imho, the user/group should be specific to an application - to permit something akin to "data ownership". Ideally, an application would have all it's files as 600 or 400 (aka rw-------, r--------) and access to data is via the application, not via the filesystem.

Ok - it is off-topic - but this is by far the most read thread on the AIX forum.

Closer to topic: rather than using octal notation for changing mode - use the ugo (user, group, other) +-= (add, remove, setto) rwx (read, write, eXecute_file/access_search_directory). Using octal modes you may be clearing other bits outside the lower 12-bits aka 0777 range.
Old 09-28-2016, 11:15 AM   #17
Registered: Mar 2015
Distribution: Linux Mint
Posts: 611

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
Ah, someone reprimanding you for what permissions you chose. Took 12 years but good to know they'll always show up.
However since it's been raised again ... and current answers covered xargs and find, I'll use parallel to do the same

parallel -0m 'chmod 444 {}' :::: <(find . -type f -print0)

       -0       Use NUL as delimiter.  Normally input lines will end in \n (newline). If they end in \0 (NUL), then use this option. It is useful for processing arguments that may contain \n (newline).
       -m       Multiple arguments. Insert as many arguments as the command line length permits. If multiple jobs are being run in parallel: distribute the arguments evenly among the jobs. Use -j1 or --xargs to avoid this.

                If {} is not used the arguments will be appended to the line.  If {} is used multiple times each {} will be replaced with all the arguments.

                Support for -m with --sshlogin is limited and may fail.

                See also -X for context replace. If in doubt use -X as that will most likely do what is needed.
       {}       Input line. This replacement string will be replaced by a full line read from the input source. The input source is normally stdin (standard input), but can also be given with -a, :::, or ::::.

                The replacement string {} can be changed with -I.

                If the command line contains no replacement strings then {} will be appended to the command line.
       :::: argfiles
                Another way to write -a argfile1 -a argfile2


   Process Substitution
       Process substitution is supported on systems that support named pipes (FIFOs) or the /dev/fd method of naming open files.  It takes the form of <(list) or >(list).  The process list is run with its input or output connected to
       a FIFO or some file in /dev/fd.  The name of this file is passed as an argument to the current command as the result of the expansion.  If the >(list) form is used, writing to the file will provide  input  for  list.   If  the
       <(list) form is used, the file passed as an argument should be read to obtain the output of list.

       When available, process substitution is performed simultaneously with parameter and variable expansion, command substitution, and arithmetic expansion.
. == use current directory
-type f
       -type c
              File is of type c:

              b      block (buffered) special

              c      character (unbuffered) special

              d      directory

              p      named pipe (FIFO)

              f      regular file

              l      symbolic link; this is never true if the -L option or the -follow option is in effect, unless the symbolic link is broken.  If you want to search for symbolic links when -L is in effect, use -xtype.

              s      socket

              D      door (Solaris)

              True;  print the full file name on the standard output, followed by a null character (instead of the newline character that -print uses).  This allows file names that contain newlines or other types of white space to be
              correctly interpreted by programs that process the find output.  This option corresponds to the -0 option of xargs.

There are many guides out there on how to use correct permissions, use a search engine and look for them


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
chmod deleted my files NonSumPisces Linux - Newbie 14 09-22-2007 11:37 PM
Can chmod affect `future' files? Rodolfo Medina Linux - General 4 08-17-2005 03:23 AM
chmod recursive on files on dlublink Linux - Newbie 6 03-02-2005 08:45 AM
tar: '--no-recursion' option doesn't prevent recursion Earl Parker II Slackware 12 08-17-2004 02:49 AM
chmod command not affecting files blueleft Linux - General 4 08-09-2003 11:26 AM > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration