File permissions may be fouled up on web server …

Sometimes it happens to me that after I have changed a CGI script and FTPed it over to my web server the script won’t run because it has lost its original permission settings, especially it has lost its “executable for all” file permission. The problem is: I can’t define “sometimes” more precisely. Sometimes I have to change the file permission after FTP has finished transferring the file, sometimes not. I can’t spot a pattern nor discover a fix for this. Somehow I got used to this problem and fixing file permissions became a default activity after I have transferred a file over to my web server. I even stopped wondering whether I am the only one having that problem and possibly overlooked some basic thing to avoid this, or whether this is a more common problem.

Today I have been reading this in chapter 15 of the book “Beginning Python: From Novice to Professional, Second Edition” by  Magnus Lie Hetland:

Tip: Sometimes, if you edit a script in Windows and it’s stored on a UNIX disk server (you may be accessing it through Samba or FTP, for example), the file permissions may be fouled up after you’ve made a change to your script. So if your script won’t run, make sure that the permissions are still correct.

It always feels good if you discover that you are not alone with a weird problem you have. Apparently this really seems to be a more common hiccup happening somewhere between Windows and Linux systems. Good to know.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: