Hi,
I am building my own website and using my own ubuntu apache2 server.
I was writing a script(PHP) that opens a text file containing a password (encrypted).
My problem is a don't know how to set permissions on this file to allow my PHP command to open it and not EVERYONE visiting my site.
I tried chmod and chown but my original thought of php commands running as root, i now see were wrong.
I would like to access this file as a PHP command, and my Local User.
Another question kinda relating to this is I would like to learn more about "Group" permission setting and how to put a user in a group and then give that group access to the "Group" permission on a file/folder. (Just a link to a tutorial or documentation on group file permissions would be great, I tried googling but didn't seem to find anything useful)
Thanks
EDIT:
Okay I kinda fixed the first problem. All PHP commands are run under the www-data user so I just chown www-data mydirectory/file and the php runs fine now.
BUT, now my local user that I connect via FTP with cannot access it.
I would still really like to learn more about groups and users. If anyone has a good link please share, or a good quick explanation would be greatly appreciated.
Bookmarks