LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   change permissions on subdirectory (https://www.linuxquestions.org/questions/slackware-14/change-permissions-on-subdirectory-4175668823/)

deretsigernu 05-16-2020 06:51 PM

I did read up some on NTFS-3G. Looked at most of the software author's site. I tried to get on the forum to ask my question, but like this LQ user indicated, I couldn't find how to register.

As mumahendras3 pointed out, sounds like I need to map the users, Windows and Slackware, on /fat-d. This gets to my question. If I do the mapping (haven't actually tried it yet), do I need to then designate each file with an user/owner? It's unclear to me how NTFS-3G will know which user has permissions on which file. There are thousands of files on that drive and I'm fine with leaving everything as is. I'd rather not have to map users to all the files. I just need to get that one data directory I mentioned above mapped, I guess, to the Slackware postgres user, so that PostgreSQL will function with that directory.

deretsigernu 07-24-2020 03:34 PM

I finally got my partition configured. Using the definitions found here, I didn't map the users. Instead I changed my fstab file. The line for my "data" partition in fstab, called "/fat-d", was originally:

Quote:

UUID=82CC1BFECC1BEAE5 /fat-d ntfs-3g fmask=111,dmask=000 1 0
I changed "fmask=111,dmask=000" to "permissions". Now the ownership of a directory file depends on the user that created that file.

For example, if I

Quote:

bash-5.0$ mkdir /fat-d/data/linux/pgsql (as the user postgres)
I get
Quote:

bash-5.0$ ls -la /fat-d/projects_and_data/data/linux/pgsql
total 4
drwxrwxrwx 1 root root 0 Jul 19 12:15 .
drwxrwxrwx 1 root root 0 Feb 1 14:23 ..
drwx------ 1 postgres users 4096 Jul 24 14:53 data
I needed a couple more steps to configure postrgresql and now I can use psql with the data directory I created for the app.

I don't know if it's the most secure set up ever. I've got back-ups and nothing sensitive here. Anyway, I'm glad I got this pulled off.


All times are GMT -5. The time now is 12:12 PM.