How to make my my public_html file readable ?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make my my public_html file readable ?

Hercule Hercule
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 :


Regards

Hercule

_______________________________________________
Toolserver-l mailing list ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Reply | Threaded
Open this post in threaded view
|

Re: How to make my my public_html file readable ?

Jeremy Baron
On Wed, Dec 11, 2013 at 7:58 PM, Antoine D <[hidden email]> 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 ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Reply | Threaded
Open this post in threaded view
|

Re: How to make my my public_html file readable ?

Hercule Hercule
I create them with the -o option of jsub


2013/12/11 Jeremy Baron <[hidden email]>
On Wed, Dec 11, 2013 at 7:58 PM, Antoine D <[hidden email]> 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 ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette


_______________________________________________
Toolserver-l mailing list ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Reply | Threaded
Open this post in threaded view
|

Re: How to make my my public_html file readable ?

Jeremy Baron
On Wed, Dec 11, 2013 at 8:03 PM, Antoine D <[hidden email]> wrote:
> I create them with the -o option of jsub

Why and how do you delete them?

-Jeremy

_______________________________________________
Toolserver-l mailing list ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Reply | Threaded
Open this post in threaded view
|

Re: How to make my my public_html file readable ?

Hercule Hercule
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 <[hidden email]>
On Wed, Dec 11, 2013 at 8:03 PM, Antoine D <[hidden email]> wrote:
> I create them with the -o option of jsub

Why and how do you delete them?

-Jeremy

_______________________________________________
Toolserver-l mailing list ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette


_______________________________________________
Toolserver-l mailing list ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Reply | Threaded
Open this post in threaded view
|

Re: How to make my my public_html file readable ?

Jeremy Baron
On Wed, Dec 11, 2013 at 8:09 PM, Antoine D <[hidden email]> 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 ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Reply | Threaded
Open this post in threaded view
|

Re: How to make my my public_html file readable ?

Hercule Hercule
thanks for these hints

Hercule


2013/12/11 Jeremy Baron <[hidden email]>
On Wed, Dec 11, 2013 at 8:09 PM, Antoine D <[hidden email]> 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 ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette


_______________________________________________
Toolserver-l mailing list ([hidden email])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette