0

In my shell script I have to access all the log files in the directory. I have set chmod -R 777 to the directory. From this all the log files that are currently available in this directory are set with read,write and execute permissions. Is there anyway I can give the same permissions to the log files generated later, after the permissions has been set.

Rudra
  • 195
  • 1
  • 1
  • 9
  • This may help. http://stackoverflow.com/questions/3740152/how-to-set-chmod-for-a-folder-and-all-of-its-subfolders-and-files-in-linux-ubunt – NeonGlow Feb 27 '13 at 11:16
  • @ NeonGlow chmod -R is the one I have used for that directory. – Rudra Feb 27 '13 at 11:19
  • I think, that question @ SO has the same requirement as yours. It says `If I create a new folder or file the chmod of that should be also 755`. If the answers there are correct then it should work. Anyway I didn't check it for myself. – NeonGlow Feb 27 '13 at 11:22
  • @NeonGlow no it is not happening... – Rudra Feb 27 '13 at 11:25
  • Sorry for false information. Hope this will be useful. http://superuser.com/questions/151911/how-to-make-new-file-permission-inherit-from-the-parent-directory – NeonGlow Feb 27 '13 at 11:36
  • @NeonGlow I learnt that umask should be used. My file is in the format mysql-bin.XXXXXX. It is in this path=/usr/local/mysql/data – Rudra Feb 27 '13 at 11:39

0 Answers0