Visit Our UNIX and Linux User Community


Log file - permission


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Log file - permission
# 1  
Old 04-19-2002
Data Log file - permission - Mandrake Linux 8.2

Dear all

I have installed Openwebmail 1.64 on Mandrake Linux 8.2. This application creates a log file at /var/log with the name openwebmail.log. The application needs that the permission of this log file should be as follows:

owner - root
group - mail
mode - 660

Even though i set the parameters of the file as above, the parameters changes as below after a gap of 25 minutes, automatically, thus preventing the Openwebmail application to write to the /var/log/openwebmail.log file.

owner - root
group - root
mode - 640

Smilie

Last edited by ajkiruba; 04-19-2002 at 10:14 AM..
# 2  
Old 04-19-2002
look for config file

When you load this application and it starts up, does it create the log file or do you create the log file at the beginning?

If the program creates the log file, then you should have a configuration in the file that you need to look at.

If you must create the file, are you root when you do this? Most logfiles on my system are root:root owner:group.

Try to find a config related to the application that will allow you to specify the log file.

Unless you have already done this, as root, try "chown root:mail mylogfile" and "chmod 660".


Smilie
# 3  
Old 04-19-2002
also if you have permission to read in directory, and write. but not permission to write to file, then you can issue a compress on the file as the other user, when you uncopmress (as other user, it you will have ownership. id s
# 4  
Old 04-22-2002
Network

Dear Kelam

The application requires of the user to create the log file - and hence i do. When i create the log file openwebmail.log in the directory /var/log i am as a superuser. The question is how the permissions get changed automatically ? I wonder if there is any security mechanism of the Linux OS which make this change ? Irrespective of the no. of times i change the permission and mode of the file, they get changed automatically after 25 minutes.

I've checked the configuration file. The configuration file just has an indication to the path of the log file and nothing more related to the permissions and mode. Otherwise, the scripts have been wirtten in Perl script about which i don't have any idea at all.

Kindly help me.

Thanks & regards

- jose
# 5  
Old 04-23-2002
Sounds like you have either a daemon or a cron job that is doing this.

If you can't find where this is running from you should have a cron log. It might be under /var/adm/cron/log. This file will tell you what is running from cron, if it doesn't appear obvious in the crontab.

OR if you can change the location of the logfile, I would try that also.

BTW, when you loaded this app, did it give you any options to set? like where the logfile goes, what the parms are, etc...

Hope this helps...

Smilie
# 6  
Old 04-24-2002
Data

Dear Kelam

My log file is available at /var/log/cron. It does execute three files at /ect/cron.hourly. But none are related to this logfile /var/log/openwebmail.log. One msec command is executed, but these 2 files and 1 command are executed hourly and not for every 30 minutes.

Even if i remove the log file, the moment i execute the application which is Openwebmail, the logfile is created by the application. After 30 min. gap the permission of group changes to 'root' from mail and mode from '0660' to '0640', which were the permissions and mode when the file was created automatically.

Now, if the change the path of the logfile to a different directory, i am able to login, but while logging out, the application generates the error 'Could not open <log-file-path>/openwebmail.log'.

During the installation of this application there were no questions asked. Options can be altered in the config file wherein i had changed the path of the config file.

How to go ahead ? I can create cron entry so that it runs every 25 minutes to circumvent this problem. But, the question is why and how this occurs ?

Thanks Kelam.

- jose
# 7  
Old 04-24-2002
That is a good workaround. However, I would set it to fire off every 5 minutes.

1,6,11,16,21, etc... * * * * chmod 660 logfile


One other thing, in HPUX in the CDE or TUI (text user interface) we can manage logfiles. Maybe you have a tool that manages logfiles from an OS perspective, like where they are, permissions etc ...

Do you have anything like this?



Smilie

Previous Thread | Next Thread
Test Your Knowledge in Computers #410
Difficulty: Easy
Trusted XENIX was a variant initially developed by HP-UX, under the name Secure XENIX.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File permission

Only kernel can write to a directory file. Then what does write permission for a directory imply? (2 Replies)
Discussion started by: vijaysy
2 Replies

2. AIX

Syslog log file permission not getting modified.

I'm trying to set the permission for the syslog log file in syslog,conf. --------- The below is my configuration file ## example: # "mail messages, at debug or higher, go to Log file. File must exist." # "all facilities, at debug and higher, go to console" # "all facilities, at crit or... (1 Reply)
Discussion started by: novaothers
1 Replies

3. Emergency UNIX and Linux Support

/var/log/wtmp SuSE log permission rollback

Hello All, On my SuSE system, I have wtmp log this log file permission is 644 but every reboot the file permission rollback to 664. In the logrotate.conf and logrotate.d/wtmp files the wtmp logrotate set to 644. I would like to know, which "file" or "script" modify the wtmp log to rollback to... (7 Replies)
Discussion started by: kalaso
7 Replies

4. Shell Programming and Scripting

file permission

Hi All, https://www.unix.com/unix-advanced-expert-users/105758-chmod-parent-sub-directories.html I have to change permission for the directories and subdirectories in single command when googled i found some updates but i understand what is switch. If there is a command please... (2 Replies)
Discussion started by: thelakbe
2 Replies

5. Solaris

file permission

hi frnds can u explain /etc/shadow file have read and write permissions for root only but while normal user changes his passwd it also updated in that file whats the logic behind that. (2 Replies)
Discussion started by: sravan ega
2 Replies

6. Solaris

Permission denied in SMF service log

I can't get the exact error message because I am at home, but on Solaris 10u5 machine I have at work, a few services are stuck in the maintenance state with the following error message in the individual service logs (/var/svc/log/FMRI:instance.log): Cannot chdir: permission denied Fortunately... (2 Replies)
Discussion started by: ilikecows
2 Replies

7. UNIX for Dummies Questions & Answers

permission on file

i have two user named sourav and jishu. i have created a file named source.txt in sourav. i made another user called shovon. i want to give read write permission of souce.txt for shovon but not for jishu. how can i set permission only for jishu ? (1 Reply)
Discussion started by: sourav_ray
1 Replies

8. Cybersecurity

file permission/acl: 2 users with write access on 1 file...

Hello, i need some help/advice on how to solve a particular problem. these are the users: |name | group | ---------- --------------- |boss | department1 | |assistant | department1 | |employee | department1 | |spy | department2 | this is the... (0 Replies)
Discussion started by: elzalem
0 Replies

9. UNIX for Dummies Questions & Answers

File Permission

Hi, When I listed one directory in Sun, it showed that : -rwsr-xr-x 1 root bsmbin 78004 Oct 21 2004 bsmprsm I don't know meaning of the character "s" in "rws" above. I have searched in Sun admin documents but no result. Would you please explain it ? :) Thank you so much. (1 Reply)
Discussion started by: msg098
1 Replies

10. Shell Programming and Scripting

The file permission

there is a directory eg. /home/edp/ , all the files under this directory : 1. the file and directory owner is "user1" , 2. the permission is 644 I want everyone hv permission to overwrite all files and write a new file to it , but I want the file owner and permssion keep unchange , could... (1 Reply)
Discussion started by: ust
1 Replies

Featured Tech Videos