Page 1 of 1

backing up subscribers.txt

PostPosted: Fri Dec 15, 2006 7:46 am
by Nenameseck
I've found that since the script saves the subscribers.txt file with rights of 700, only the script is able to do ANYTHING with it. If I go in and attempt to change the rights, it just ignores any change. Any attempt to do anything with the file results in a 550 error, access denied. The problem is, how are you supposed to be able to backup your subscriber list?

PostPosted: Fri Dec 15, 2006 7:06 pm
by Admin-BS
The permissions are set to 700 to prevent people from looking at the text file through the web. If you access your hosting through FTP (or even though a file manager online), you should be able to at least read the subscribers.txt file through that interface.

If you can't read it that way, which doesn't honestly make sense, you should probably conult your host.

PostPosted: Sat Dec 16, 2006 10:11 am
by Nenameseck
I'm using Ipswitch WS_FTP Home for my FTP program. I also noticed that the documentation said to give the CGI files a permission of 755, but on my host, that permission didn't seem to allow any files to be created (such as the configuration file) and updated. I ended up allowing full access (777) to get it to work.

What should the permissions be for the .txt files?

PostPosted: Sat Dec 16, 2006 6:52 pm
by Admin-BS
It all depends on how your host runs scripts, and how permissions are set when you initially upload files. If you upload the files and it sets ownership of everything to your username, but then runs scripts as another user (such as www-data), then you will run into problems if your permissions are set for the owner of the file (such as 700, which allows only the owner to read/write/execute).

It sounds like if you have to set your permissions to 777 to get the script to run, you might be experiencing what I described above. In this case, you should set the permissions of everything to 777 (text files included). This isn't exactly the most secure approach since your files will probably be readable to anybody that wants to load them up in a browser (passwords are encrypted though), but it may be the only way to get it to work.

If you want to keep your list of subscribers private, you would then need to look into using an SQL database if you can. This way, the email addresses and other info belonging to every subscriber are not stored in plain text files that can be viewed in a browser.