Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
File permission S ?
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- File permission S ?
File permission S ?
13-04-2014 4:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
PHP files I'm loading to my cgi site aren't executing - the browser says they can't be found - however I can see them in Filezilla.
Whatever I set the permission to they still can't be seen by the browser.
I had some php files loaded before the migration and I notice these all have a mysterious extra permission - S - so a file might show -rwx--S---
All the files with an S work but I can't see anyway to set this attribute in Filezilla for my new files.
A bit of Googling seems to indicate this is a setuid flags? However my technical knowledge is pretty low and I can't understand most of the articles.
Can anyone explain in simple terms how I can set this on my new files (or change it so the files don't require it).
Message 1 of 7
(2,405 Views)
6 REPLIES 6
Re: File permission S ?
13-04-2014 5:38 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: sofaville PHP files I'm loading to my cgi site aren't executing - the browser says they can't be found - however I can see them in Filezilla.
Can anyone explain in simple terms how I can set this on my new files (or change it so the files don't require it).
Hi sofaville,
stupid question maybe but are the php files in the "public" directory? I've just checked the ones that were migrated (here) and they all are (in that directory) - all seem to be working with attributes set to 755 (that was what was used previously but have just checked a current one and they're the same).
The only incidences of S markings seem to be on "directories" (folders) in the outer bit that contains only the "provided" directories (ie those provided by the Dublin people) and the .htaccess file. (The outer bit might be able to hold other stuff maybe but no php files were in the outer bit, in the set-ups provided for the migrated files here.)
I hope that makes sense

Regards,
Penny.
Penny Rollo * * * joined Force9 on 17/02/98 * * with PlusNet from 2000 onwards
https://www.happychild.org.uk - FREE stuff for kids including huge Pokémon area and 50 Harry Potter wordsearch puzzles *
20,000 free worksheets (maths, languages, reading, spelling), accelerated learning + lots more * projects helping kids worldwide
https://www.happychild.org.uk - FREE stuff for kids including huge Pokémon area and 50 Harry Potter wordsearch puzzles *
20,000 free worksheets (maths, languages, reading, spelling), accelerated learning + lots more * projects helping kids worldwide
Superusers are not PlusNet staff but do have a direct line of communication into the business to raise issues, concerns and feedback from the Community.
Message 2 of 7
(445 Views)
Re: File permission S ?
13-04-2014 5:44 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
To add to what Penny has just posted.
Are you uploading your PHP files as ascii transfers to /public? PHP files in there should work with the default 644 permissions (-rw-r--r--), or even with 600 (-rw-------). Migrated ones would probably be 700 or 755 (which as Penny said continue to work).
The following file
[code=helloworld.php]
<?php
echo "Hello world!";
?>[/code]
works for me with permissions 644 or 600.
Permissions -rwx--S--- imply the script is setgid, but only superuser can set that. Usually that is set only on directories and it should be on your root directory (/). My /public directory has permissions 755 (though I think it was 775 post migration).
David
Are you uploading your PHP files as ascii transfers to /public? PHP files in there should work with the default 644 permissions (-rw-r--r--), or even with 600 (-rw-------). Migrated ones would probably be 700 or 755 (which as Penny said continue to work).
The following file
[code=helloworld.php]
<?php
echo "Hello world!";
?>[/code]
works for me with permissions 644 or 600.
Permissions -rwx--S--- imply the script is setgid, but only superuser can set that. Usually that is set only on directories and it should be on your root directory (/). My /public directory has permissions 755 (though I think it was 775 post migration).
David
David
Message 3 of 7
(445 Views)
Re: File permission S ?
14-04-2014 8:31 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks everyone for your help... although I'm embarassed to admit I discovered what my problem was. My code was pointing at the old cgi domain not the new one - so it was simply an error in the url. The whole File Permission S thing was a red herring.
Message 4 of 7
(445 Views)
Re: File permission S ?
14-04-2014 10:32 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
.
At least it's sorted, that's the main thing, thanks for the update : )
At least it's sorted, that's the main thing, thanks for the update : )
Penny Rollo * * * joined Force9 on 17/02/98 * * with PlusNet from 2000 onwards
https://www.happychild.org.uk - FREE stuff for kids including huge Pokémon area and 50 Harry Potter wordsearch puzzles *
20,000 free worksheets (maths, languages, reading, spelling), accelerated learning + lots more * projects helping kids worldwide
https://www.happychild.org.uk - FREE stuff for kids including huge Pokémon area and 50 Harry Potter wordsearch puzzles *
20,000 free worksheets (maths, languages, reading, spelling), accelerated learning + lots more * projects helping kids worldwide
Superusers are not PlusNet staff but do have a direct line of communication into the business to raise issues, concerns and feedback from the Community.
Message 5 of 7
(445 Views)
Re: File permission S ?
14-04-2014 6:53 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: spraxyt Permissions -rwx--S--- imply the script is setgid, but only superuser can set that.
Just as an aside, you don't have to be a su to set sgid, just a member of the relevant group with permission in the containing folder. A wrinkle on the new platform, relative to the old, is that php scripts run with one gid and shell scripts with another. If you use both, then setting sgid on folders can help keep all the gids of files a folders created within them the same, though the mix is only likely to cause issues if you use paranoid permissions. It can be set programmatically, e.g.
chmod($_SERVER['DOCUMENT_ROOT'], 02700);
Gabe
Message 6 of 7
(445 Views)
Re: File permission S ?
15-04-2014 11:00 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for clarifying this.
David
David
David
Message 7 of 7
(445 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page