Rsyslog producing errors when trying to write to mounted drive
1
vote
1
answer
4167
views
Could anyone take a look at this and see if I've done something obviously wrong?
I am running RockyLinux and attempting to setup a syslog server.
Its running with an Azure VM with an additional 2TB datadrive attached.
I have mounted the drive in Rocky and amended
fstab
, confirming its presence upon reboot, and I can write to it.
Rsyslog is all setup and configured and works fine if I leave the default settings and allow logs to be sent to /var/log but as soon as I point it to my datadrive I get permission errors.
May 24 11:30:20 MyServer rsyslogd: error during config processing: Could not open dynamic file '/datadrive/syslogs/MyServer/rsyslogd.log' [state -3000] - discarding message [v8>
May 24 11:30:20 MyServer rsyslogd: error during config processing: omfile: creating parent directories for file '/datadrive/syslogs/MyServer/rsyslogd.log' failed: Permission denied
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs 1.6G 148M 1.4G 10% /run
/dev/sda3 7.9G 1.8G 6.1G 23% /
/dev/sda2 994M 430M 564M 44% /boot
/dev/sda1 100M 7.0M 93M 7% /boot/efi
/dev/sdb1 16G 28K 15G 1% /mnt
tmpfs 769M 0 769M 0% /run/user/1000
/dev/sdc1 2.0T 15G 2.0T 1% /datadrive
And the two directories have the same permissions and owners
[myroot@MyServer log]$ pwd
/var/log
.......
drwx------. 2 root root 31 May 24 11:09 remote-device
[myroot@MyServer /]$ pwd
/
.....
drwx------. 3 root root 21 May 24 10:03 datadrive
The only thing I have noticed is that when I try to enter the data drive cd /datadrive
and sudo cd /datadrive
is not working, I have to issue sudo su
before changing directory to /datadrive
Could this be what is causing the issue? Any thoughts would be appreciated.
Asked by Beckyboo
(31 rep)
May 24, 2023, 11:42 AM
Last activity: Jul 2, 2023, 04:37 AM
Last activity: Jul 2, 2023, 04:37 AM