Creating, re-creating your data file and fixing your data file permissionsCreating and re-creating your data fileIf you need to create or re-create your data file run the command mkdat
which was previously called setacl.bsh. The mkdat command
currently lives in the non-standard directory /home2/c/w/wwwdev/bin or just ~wwwdev/bin. The mkdat command is interactive and will prompt you for the sub-directory within your data HOME directory where you would like your data file placed. It will not overwrite an existing directory or data file. For example initially running:~wwwdev/bin/mkdat /www/prod/some_site_dir places you in the /www/prod/some_site_dir directory and prompts for a sub-directory name to be created within this directory. Upon successful completion of mkdat you should have a directory for your data file created within /www/prod/some_site_dir and an empty data file within this directory. The default and typical behavior of mkdat has been left unchanged and when run without providing a data HOME directory will assume data HOME is the account's HOME directory. You will then be prompted for the name you wish to give your data file. It will not overwrite an existing file. However, it will ensure the file is accessible to the web server.If the file does not exist, it will create the file and ensure the file is accessible to the web server.
The process will repeat until you enter 'q' to quit the program. This will allow you to create
multiple directories and/or data files for multiple forms. On exit from the program, e-mail will be sent to the administrator. This e-mail will contain a record of any directories and files you created with mkdat. You may be contacted if the directory names and files you create using mkdat do not match the names you requested on the registration form. Fixing your data file permissionsOne of the tasks mkdat handles is setting the permissions on the data file to allow the web server to write to the file. It does this by setting an ACL (access control list) on the file giving the web server write permission. Occassionally this ACL gets removed. For example, opening your data file in Emacs will remove the ACL. To reset the ACL on your data files simply run mkdat script again and provide the existing directory and data file names. The mkdat command will not re-create an existing file. It will simply adjust the permissions to allow the web server write access. To avoid the issue with the ACL follow the guidelines in the section "Retrieving and viewing your data files." Retrieving and viewing your data filesViewing the contents of a data fileWarning: a problem has been discovered when using Emacs to view your data files. Emacs will remove the ACL set on your data file. This will prevent the web server from writing the data from your HTML form to your data file.Tested alternatives: the pico editor, using the view option in WS FTP. Using the less, more, cat, tail commands are fine also. Tips for using cat, more, tail and the mvdat command are included below. Methods for retrieving and viewing your data filesThe steps outlined below describe working with your data file from the UNIX environment. If you wish to work with your file on a personal computer you should transfer the file to your computer using an FTP client. The file can then be imported into any program which supports importing of text data, or you can simply open the file in a text editor to view the data. Methods for working with your data files:
|