Forum OpenACS CMS: permission denied
I've created a folder "subfolder1", and it contains a file
"myFirstPage". When I try to publish this file (checking "live" &
hitting "submit" in the "publishing" tab), I get the following error:
can't create directory "/subfolder1": permission denied
"file mkdir [string range $path 0 [expr $index - 1]]"
(procedure "mkdirs" line 11)
invoked from within
puts $errorlog "pageroot used for mkdir: [ns_info pageroot]"
into the publish::mkdirs function in publish-procs.tcl to make sure the correct directory is being accessed, and it is: /web/openacs/www
The pageroot directory is owned by nsadmin.web; I start nsd w/
exec /opt/nsadmin/bin/nsd -u nsadmin -g web $*
and nsadmin belongs to group web.
The problem persists even if I chmod the pageroot to 777!
Can anybody think of what else I could check?
That makes sense. I assumed that all files & folders created in the CMS would automatically be added under a legal (i.e. accessible for nsadmin) folder, namely the pageroot (www).
So, I created the path /web/openacs/www/subfolder2 and moved myFirstPage in there, and publishing worked.
Of course, I could only do that because I happen to know legal paths on the server. Other users would not. I suppose I could hardcode this path somewhere in publish-procs.tcl or add it as a parameter in the global config file (openacs.tcl). Or is there another way to tie the CMS to a legal directory?
I'm pressed for time now, but I'll try and track it down this week.