View Issue Details

IDProjectCategoryView StatusLast Update
0016027CentOS-7[All Projects] generalpublic2019-04-24 05:03
Reportertermcap 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Platformx86_64OSCentOS Linux releaseOS Version7
Product Version7.4.1708 
Target VersionFixed in Version 
Summary0016027: XFS Filesystem: Two files with same file name in the same directory
DescriptionI was trying to setup samba audit logs and send the logs to /var/log/samba/audit.log. As samba was not logging and the file was not getting created, I manually created the file audit.log at the following location: /var/log/samba/audit.log

Later, without deleting the empty file /var/log/samba/audit.log I created earlier, I setup a rsyslog loging facility LOCAL5 and set the file as /var/log/samba/audit.log

After restarting samba and rsyslog I found two audit.log files created under the /var/log/samba directory. One was 0 bytes, the other was being written to by SAMBA

(Check the screen shots.)
Steps To Reproduce1. Create an empty /var/log/samba/audit.log
2. Configure rsyslog to write to /var/log/samba/audit.log
3. You will find two files audit.log under /var/log/samba
4. Delete audit.log, rm will delete the 0 bytes file, leaving the audit.log being written to by rsyslog
5. touch audit.log, instead of throwing "file exists", another 0 byte audit.log is created
Additional InformationDo note that both the audit.log file has two different inodes.
Tagsxfs
abrt_hash
URL

Activities

termcap

termcap

2019-04-23 10:45

reporter  

rsyslog-bug.PNG (31,073 bytes)
rsyslog-bug.PNG (31,073 bytes)
syslog-inode.PNG (22,484 bytes)
syslog-inode.PNG (22,484 bytes)
TrevorH

TrevorH

2019-04-23 15:57

manager   ~0034240

Please show the output from

find /var/log/samba/ -type f -printf "\"%f\"\n"
termcap

termcap

2019-04-24 05:03

reporter   ~0034246

So its a space at the end of the file name!

Check the screenshots below from the command requested above and configuration file for rsyslogd which had a space after the file name. Shoudn't rsyslog strip the logfile of any spaces while parsing ?

audit.log.space.PNG (2,453 bytes)
audit.log.space.PNG (2,453 bytes)
rsyslog-space.PNG (7,492 bytes)
rsyslog-space.PNG (7,492 bytes)

Issue History

Date Modified Username Field Change
2019-04-23 10:45 termcap New Issue
2019-04-23 10:45 termcap File Added: rsyslog-bug.PNG
2019-04-23 10:45 termcap File Added: syslog-inode.PNG
2019-04-23 10:45 termcap Tag Attached: xfs
2019-04-23 15:57 TrevorH Note Added: 0034240
2019-04-24 05:03 termcap File Added: audit.log.space.PNG
2019-04-24 05:03 termcap File Added: rsyslog-space.PNG
2019-04-24 05:03 termcap Note Added: 0034246