Hello,
In order to check my scripts activity I generate my log files in my public_html folder. Unfortunatly I can't read these files (I delete them frequently, so they are recreated).
Is there any option to make all the new files in public_html viewable ? Currently I have a "Forbidden" error but I can see the folder content :
http://tools.wmflabs.org/herculebot/
Regards
Hercule
On Wed, Dec 11, 2013 at 7:58 PM, Antoine D hercule.wikipedia@gmail.com wrote:
In order to check my scripts activity I generate my log files in my public_html folder. Unfortunatly I can't read these files (I delete them frequently, so they are recreated).
How do you manually make them readable? You can't either write them out in a readable state to begin with (umode, etc.) or integrate the relevant chown/chgrp/chmod into whatever generates them?
-Jeremy
I create them with the -o option of jsub
2013/12/11 Jeremy Baron jeremy@tuxmachine.com
On Wed, Dec 11, 2013 at 7:58 PM, Antoine D hercule.wikipedia@gmail.com wrote:
In order to check my scripts activity I generate my log files in my public_html folder. Unfortunatly I can't read these files (I delete them frequently, so they are recreated).
How do you manually make them readable? You can't either write them out in a readable state to begin with (umode, etc.) or integrate the relevant chown/chgrp/chmod into whatever generates them?
-Jeremy
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
On Wed, Dec 11, 2013 at 8:03 PM, Antoine D hercule.wikipedia@gmail.com wrote:
I create them with the -o option of jsub
Why and how do you delete them?
-Jeremy
I delete them because jsub always append new logs. To delete them I have added a rm job in my crontab
Hercule
2013/12/11 Jeremy Baron jeremy@tuxmachine.com
On Wed, Dec 11, 2013 at 8:03 PM, Antoine D hercule.wikipedia@gmail.com wrote:
I create them with the -o option of jsub
Why and how do you delete them?
-Jeremy
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
On Wed, Dec 11, 2013 at 8:09 PM, Antoine D hercule.wikipedia@gmail.com wrote:
I delete them because jsub always append new logs. To delete them I have added a rm job in my crontab
So change that to truncate instead of rm?
you can either:
$ > filename $ cp /dev/null filename
Both will truncate the file. (no leading $, that's just your prompt)
also, you can use logrotate! :) (probably already installed. see `man logrotate`, https://en.wikipedia.org/wiki/Log_rotation, etc. logrotate can do truncation, make sure the new file after a move has the right perms, run arbitrary commands before/after, etc.)
-Jeremy
thanks for these hints
Hercule
2013/12/11 Jeremy Baron jeremy@tuxmachine.com
On Wed, Dec 11, 2013 at 8:09 PM, Antoine D hercule.wikipedia@gmail.com wrote:
I delete them because jsub always append new logs. To delete them I have added a rm job in my crontab
So change that to truncate instead of rm?
you can either:
$ > filename $ cp /dev/null filename
Both will truncate the file. (no leading $, that's just your prompt)
also, you can use logrotate! :) (probably already installed. see `man logrotate`, https://en.wikipedia.org/wiki/Log_rotation, etc. logrotate can do truncation, make sure the new file after a move has the right perms, run arbitrary commands before/after, etc.)
-Jeremy
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
toolserver-l@lists.wikimedia.org