Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunitySetup and InstallationInstallation and Setup (Moderators: scott, DanO, Marty)Permissions Seem To Change Automatically ?
Pages: [1]   Go Down
Print
Author Topic: Permissions Seem To Change Automatically ?  (Read 495 times)
0 Members and 1 Guest are viewing this topic.
Bob J.
Guest
« on: March 21, 2004, 12:45:00 PM »

After several years of no-problems at all operation, I recently had to migrate Ver 3.0 from an Irix server to a FreeBSD server.

Now when I Add or Edit events and save those changes both the events.txt and schedule.txt file permissions automatically change from 777 to 644.  Of course after this, the program will no longer run and produces and error message saying those files cannot be found or I do not have Write permission which of course is now true.

I can go in and CHMOD back to 777 and enter another event, but then the permissions automatically flip back to 644 again.  Debug.cgi supports this report.

Anyone have any ideas why this is happening; it didn't happen when running on the Irix server.  Could this be a server configuration issue ?  I'm stumped.  Any help greatly appreciated.   Thanks

Bob

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: March 21, 2004, 04:31:00 PM »

** Anyone have any ideas why this is happening; **

Well since setting files or directories to 777 is a security risk, many servers do not allow it at all. Maybe yours is programmed to change the permissions in that case rather than just stopping all access to them like happens on a couple of my hosts.

Try chmoding them to 666 (and their directory- if necessary) which is all that should be required, read and write permissions, not execute permissions. You could also try 766 if you don't like the 666 number.

JMO

Dan O.

------------------

Logged
Bob J
Guest
« Reply #2 on: March 21, 2004, 05:23:00 PM »

Hello Dan,

Thanks for your note.

I tried your suggestion of setting permissions to 666 and the same thing happens; the permissions flip right back to 644.

Regards,
Bob

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: March 21, 2004, 08:30:00 PM »

In that case, try asking your host's support or maybe someone else will post a suggestion. Sorry.

Dan O.

------------------

Logged
Bob J
Guest
« Reply #4 on: March 22, 2004, 09:05:00 AM »

Thanks Dan.   I have asked the hosting provider to dig into this as it would seem it must be a server issue.  They say they have no restrictions on permission levels.

If they come up with an answer I will post that back here for others to see.  This was a forced migration from one OS to another so unfortunately I cannot revert back to the previous OS where there were no problems and the application ran flawlessly for several years.

Regards,
 Bob

Logged
Bob J
Guest
« Reply #5 on: March 24, 2004, 11:47:00 AM »

I have received a reply from the hosting company indicating that the issue lies with the Calendar script.  Here's what they have said:
-------------------
********************************************************************
Problems with calendar.cgi script.
********************************************************************

The problem relates to the server change, and the change from IRIX to the FBSD server.  You will need to change some of your code, here are some links with details:

1.) You should "use Fcntl" in the perl script.
http://www.perldoc.com/perl5.6/lib/Fcntl.html
So you can keep the session file "locked", and update it when needed, i.e. a new session.

Even the perl module ``File" may work as well.

2.) You may also use something like umask for file creations.
http://www.perldoc.com/perl5.6.1/pod/func/umask.html  http://www.perldoc.com/perl5.6.1/pod/func/oct.html”


We uploaded a working example :
http://faith-lutheran-church.com/cgi-local/tmp/file.pl
------------------
This apparently relates to file locking; not sure what it has to do with permissions being changed.

Wonder if the newest version fixes any issues which involve the Fcntl module/command?

Any help appreciated at this point - should I refer this Matt for review?

Thanks,
 Bob

Logged
Scott
Guest
« Reply #6 on: March 24, 2004, 11:39:00 PM »

You may want to apply the patches to go from version 3.0 up to the current 3.21 - I did change some file-handling things along the way to help avoid situations like this. Rather than creating new files, it will open and re-write the existing files, so hopefully the issue will go away.

------------------
Scott
CalendarScript.com


Logged
Bob J
Guest
« Reply #7 on: March 25, 2004, 08:05:00 AM »

Tried the upgrade with no success; now the program will not run at all.  All I get is an Internal Server Error
-----------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@faith-lutheran-church.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
------------------

I changed the file extensions to cgi
I set the shebang line correctly
Permissions didn't change - still at 777, wide open

When I load the old calendar.cgi (ver 3.0) back onto the server, the script works again.

Any other ideas I migh try?

Regards,
  Bob

Logged
Bob J
Guest
« Reply #8 on: March 25, 2004, 08:14:00 AM »

Update
Even though the two upgrade cgi files cause issues and do not run, the new Ver 3.21 DBfile.pm seems to have solved the original problem when run with the Ver 3.0 calendar.cgi and calendar_admin.cgi scripts.

I would still like to be able to get the Ver 3.21 cgi's to run correctly if possible.

Regards,
 Bob

Logged
Scott
Guest
« Reply #9 on: April 04, 2004, 10:55:00 PM »

Are you putting the upgrade releases on in order? You can't go straight from version 3.0 to 3.21 using the latest release.

------------------
Scott
CalendarScript.com


Logged
Pages: [1]   Go Up
Print
Jump to: