Solved Help with directory permissions

I am trying to get a logging program working and it was failing to create a log file due to permissions.

I happen to stumble into starting it in /tmp directory and it worked.

So I need to recreate these rights:
drwxrwxrwt

On a directory. What is the proper way? I tried chmod 755 and chmod +X but not what I need.

drwxr-xr-x 2 root wheel 512 Apr 23 23:37 gpslog
 
Using ytree attributes I am able to change all but the last permission:

New Filemodus: drwxrwxrwx

What is the proper way to do this?
 
Good explanation here:


The next nine spaces correspond to the permissions.There are three spaces for the owner of the file, three spaces for the group ofthe file, and three spaces for other, which includes everyone else.

But what is this 10th digit I can't change from x to t ?
 
I am trying to get a logging program working and it was failing to create a log file due to permissions.

I happen to stumble into starting it in /tmp directory and it worked.

So I need to recreate these rights:
drwxrwxrwt
I would strongly recommend against doing that. The correct method is to ensure that whatever user is firing up that logging program has the right permissions to write whatever it wants, whereever it needs.

This is normally done using chmod and/or chown, optionally with chflags. This is probably a good read:


So basically: make sure you know what it needs to write (and where), then set up the correct permissions so that it can do this. That's not 1777, but rather 644, but with the right UID/GID as owner.
 
I was looking at the differences between gpxlogger and gpxloggerd and one option stands out:
-u user [:group] Lower the daemon priveleges to the specified user and group.


Sort of upstream program.

I will have to study the group that gpsd created and see what I need.
 
Since gpxloggerd is quite chatty in the logging I am going to make a ramdisk to keep my log and preserve ssd cells.
I need to figure out a method to clear the directory out when it gets near full. A FILO like method.
Suggestions?
 
Thanks for confirming that. When I looked at the authors notes:

I try to make it work just like /usr/sbin/newsyslog.

I thought to myself why use a port when there is a tool in base. It seems to be exactly what I need. Store the archives on SSD and keep the live data on ramdisk.
 
Back
Top