Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flog
12-01-2017, 10:19 AM
Post: #41
RE: flog [TODO1]
(12-01-2017 01:20 AM)lingu Wrote:  Motivation: sometimes we want to start a new log file from scratch, but flog usually just append to a file.

Solution: we add an option --newme to flog. With --newme, flog clears a file before writing a log message to it.

@xinjie

Good to me.
Find all posts by this user
Quote this message in a reply
12-03-2017, 11:59 AM
Post: #42
RE: flog
Bug: error occurred when flog for the first time because /thinker/local/today/users/lingu cannot be created.

At present, /thinker/local/today/users has access right 755. So a non-root user cannot create the dir for logging.

----
11:53:28 lingu@tb15-6:/home/lingu/forest/util/utilib> mkdir /thinker/local/today/users/lingu
mkdir: cannot create directory '/thinker/local/today/users/lingu': Permission denied
11:53:41 lingu@tb15-6:/home/lingu/forest/util/utilib> ll /thinker/local/today/
total 4
drwxr-xr-x 3 root root 4096 Nov 30 19:23 users
-----

I think we should set the permission of /thinker/local/today/users to 777

@zma
Find all posts by this user
Quote this message in a reply
12-03-2017, 03:01 PM (This post was last modified: 12-03-2017 03:02 PM by zma.)
Post: #43
RE: flog
(12-03-2017 11:59 AM)lingu Wrote:  Bug: error occurred when flog for the first time because /thinker/local/today/users/lingu cannot be created.

At present, /thinker/local/today/users has access right 755. So a non-root user cannot create the dir for logging.

----
11:53:28 lingu@tb15-6:/home/lingu/forest/util/utilib> mkdir /thinker/local/today/users/lingu
mkdir: cannot create directory '/thinker/local/today/users/lingu': Permission denied
11:53:41 lingu@tb15-6:/home/lingu/forest/util/utilib> ll /thinker/local/today/
total 4
drwxr-xr-x 3 root root 4096 Nov 30 19:23 users
-----

I think we should set the permission of /thinker/local/today/users to 777

@zma

The permission is 777 by design http://tab.d-thinker.org/showthread.php?tid=9794 .

I believe this is a bug in Autation http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?tid=9794&pid=5715 or because of some post-autation scripts creating the dir did not set its permission correctly.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-03-2017, 03:26 PM
Post: #44
RE: flog
(12-03-2017 03:01 PM)zma Wrote:  
(12-03-2017 11:59 AM)lingu Wrote:  Bug: error occurred when flog for the first time because /thinker/local/today/users/lingu cannot be created.

At present, /thinker/local/today/users has access right 755. So a non-root user cannot create the dir for logging.

----
11:53:28 lingu@tb15-6:/home/lingu/forest/util/utilib> mkdir /thinker/local/today/users/lingu
mkdir: cannot create directory '/thinker/local/today/users/lingu': Permission denied
11:53:41 lingu@tb15-6:/home/lingu/forest/util/utilib> ll /thinker/local/today/
total 4
drwxr-xr-x 3 root root 4096 Nov 30 19:23 users
-----

I think we should set the permission of /thinker/local/today/users to 777

@zma

The permission is 777 by design http://tab.d-thinker.org/showthread.php?tid=9794 .

I believe this is a bug in Autation http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?tid=9794&pid=5715 or because of some post-autation scripts creating the dir did not set its permission correctly.

In autation it sets:
"
chmod -R 0777 /mnt/sysimage/thinker/local
chmod -R 0777 /mnt/sysimage/thinker/today/users
chmod -R 0777 /mnt/sysimage/thinker/today/all
"

I guess some script change the mode.
Find all posts by this user
Quote this message in a reply
12-03-2017, 03:29 PM (This post was last modified: 12-03-2017 03:32 PM by lingu.)
Post: #45
RE: flog
(12-03-2017 03:01 PM)zma Wrote:  
(12-03-2017 11:59 AM)lingu Wrote:  Bug: error occurred when flog for the first time because /thinker/local/today/users/lingu cannot be created.

At present, /thinker/local/today/users has access right 755. So a non-root user cannot create the dir for logging.

----
11:53:28 lingu@tb15-6:/home/lingu/forest/util/utilib> mkdir /thinker/local/today/users/lingu
mkdir: cannot create directory '/thinker/local/today/users/lingu': Permission denied
11:53:41 lingu@tb15-6:/home/lingu/forest/util/utilib> ll /thinker/local/today/
total 4
drwxr-xr-x 3 root root 4096 Nov 30 19:23 users
-----

I think we should set the permission of /thinker/local/today/users to 777

@zma

The permission is 777 by design http://tab.d-thinker.org/showthread.php?tid=9794 .

I believe this is a bug in Autation http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?tid=9794&pid=5715 or because of some post-autation scripts creating the dir did not set its permission correctly.

Again, this is something that can be handled by post-autation. flog creates dirs for itself when it runs, and the first installation program run after autation should be in root privilege. So it should not be a problem to place such dir creation in post-autation.

Our experience is that it takes a long time to udpate autation. But fixing something in post-autation is a 5-min task.
Find all posts by this user
Quote this message in a reply
12-03-2017, 03:30 PM
Post: #46
RE: flog
(12-03-2017 03:26 PM)xwcwt Wrote:  In autation it sets:
"
chmod -R 0777 /mnt/sysimage/thinker/local
chmod -R 0777 /mnt/sysimage/thinker/today/users
chmod -R 0777 /mnt/sysimage/thinker/today/all
"

I guess some script change the mode.

Then dont worry about it now. Perhaps tb15-6 was installed by an older version of autation.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: