From: 7stud -- Date: 2008-04-13T03:56:08+09:00 Subject: Re: CGI - problem with calling methods 7stud -- wrote: > Rob Boellaard wrote: >> problem solved, it was a file permissions issue for the Person file. I >> guess the webserver runs as a different user. >> >> thanks anyway, >> >> Rob > > Yep. I was doing some tests, and I came to the same conclusion. I guess we might as well post the solution for future searchers. To write to a file from a cgi script, 1) The folder containing the file needs write and execute persmissions: rwx-wx-wx. To change the permissions, first cd to the directory containing the folder. Then issue the command: $ chmod 733 MyFolderContainingTheFileIWantToWriteTo If you want to read from the file later then, you will need read permissions as well, so do this: $ chmod 777 MyFolderContainingTheFileIWantToWriteTo That sets the permissions to read, write, execute for all users. 2) The file needs write permissions, e.g. rwxrw-rw-. So cd to the directory containing the file and issue the command: $ chmod 766 FileNameYouWantToWriteTo -- Posted via http://www.ruby-forum.com/.