Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

chmod and security

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  CMS for Membership Group?  
Author Message
Jim

External


Since: Dec 23, 2005
Posts: 16



(Msg. 1) Posted: Fri Dec 23, 2005 6:55 am
Post subject: chmod and security
Archived from groups: alt>www>webmaster (more info?)

I am using some php scripts that writes to different files, and the files
need a 666 chmod setting (read+write, read+write, read+write). Are there any
security issues involved in having xml or txt files on my website chmod'ed
to 666?

 >> Stay informed about: chmod and security 
Back to top
Login to vote
dave5

External


Since: Oct 02, 2004
Posts: 136



(Msg. 2) Posted: Fri Dec 23, 2005 6:55 am
Post subject: Re: chmod and security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <43abdb19$0$8068$ba624c82@nntp02.dk.telia.net>, "Jim" <j> cleared
their throat and muttered...
> I am using some php scripts that writes to different files, and the files
> need a 666 chmod setting (read+write, read+write, read+write). Are there any
> security issues involved in having xml or txt files on my website chmod'ed
> to 666?
>
>
>
the number of the beast...

--
Doobie Doobie Do, da da di da da

 >> Stay informed about: chmod and security 
Back to top
Login to vote
Jim

External


Since: Dec 23, 2005
Posts: 16



(Msg. 3) Posted: Fri Dec 23, 2005 10:55 am
Post subject: Re: chmod and security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> If you have a piece of Web-based software, be careful. If hacked (assuming
> it
> allows the user to upload files) expect this case of hijacking to put the
> entire Web server in jeopardy. Choose good software; choose hard-to-crack
> passwords.

Only the .txt and .xml file are 666, but I guess that means everyone can
replace the content? ( I am not sure how they can do that?) I do a PHP
"include" for one of them, but I guess that is a bad idea as replaced
content in <? hack ?> can very harmful...
 >> Stay informed about: chmod and security 
Back to top
Login to vote
Baho Utot

External


Since: Nov 27, 2005
Posts: 36



(Msg. 4) Posted: Fri Dec 23, 2005 11:55 am
Post subject: Re: chmod and security [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Duende

External


Since: Feb 05, 2005
Posts: 104



(Msg. 5) Posted: Fri Dec 23, 2005 4:55 pm
Post subject: Re: chmod and security [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Jim

External


Since: Dec 23, 2005
Posts: 16



(Msg. 6) Posted: Fri Dec 23, 2005 5:55 pm
Post subject: Re: chmod and security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> chmod -t 600 <filespec>
> chattr -A <filespec>

I don't have the option of setting other things than read/write/execute from
my FTP program. 600 of a data file doesn't work when a php script is called
by a web visitor, so I need to give the data file write to everyone.

I am trying to figure out what it means that "Others" have write access. Can
any hacker change the content of a 666 file (or a 622 file) in a 755 website
directory? or do they still need ftp access to change the data file?
 >> Stay informed about: chmod and security 
Back to top
Login to vote
Jim

External


Since: Dec 23, 2005
Posts: 16



(Msg. 7) Posted: Fri Dec 23, 2005 5:55 pm
Post subject: Re: chmod and security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> If you need to ask, perhaps you should be asking yourself if you
> should even be considering doing this?

All the tutorials I've read don't seem to have a problem with a chmod of
"others" to write. But I would like to know what it really means. Can any
hacker change the content of a 666 file (or a 622 file) in a 755 website
directory? or do they still need ftp access to change the data file?
 >> Stay informed about: chmod and security 
Back to top
Login to vote
mgw1979

External


Since: Jul 09, 2003
Posts: 527



(Msg. 8) Posted: Fri Dec 23, 2005 6:48 pm
Post subject: Re: Good Password Choice (Was: chmod and security) [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Jim

External


Since: Dec 23, 2005
Posts: 16



(Msg. 9) Posted: Fri Dec 23, 2005 6:55 pm
Post subject: Re: chmod and security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Perfect explanation! Thank you Mark Goodge!
 >> Stay informed about: chmod and security 
Back to top
Login to vote
Baho Utot

External


Since: Nov 27, 2005
Posts: 36



(Msg. 10) Posted: Fri Dec 23, 2005 7:55 pm
Post subject: Re: chmod and security [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
spamblocked1

External


Since: Sep 19, 2003
Posts: 3499



(Msg. 11) Posted: Sat Dec 24, 2005 12:55 am
Post subject: Re: chmod and security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Writing in news:alt.www.webmaster
From the safety of the The Good Stuff Company of the UK cafeteria
Mark Goodge <usenet.TakeThisOut@listmail.good-stuff.co.uk> said:

> On Fri, 23 Dec 2005 23:08:47 +0100, Jim put finger to keyboard and
> typed:
>
>>> If you need to ask, perhaps you should be asking yourself if you
>>> should even be considering doing this?
>>
>> All the tutorials I've read don't seem to have a problem with a chmod of
>> "others" to write. But I would like to know what it really means.
>
> It means that anyone with access to the server can change the content
> of your files. In a shared hosting environment, that means other
> customers of your web host.
>
>> Can any
>> hacker change the content of a 666 file (or a 622 file) in a 755 website
>> directory? or do they still need ftp access to change the data file?
>
> They would need legitimate access, such as an account on the server.

Yes - this is a considerable worry.

> So, in practice, it's not a major risk as anyone who did alter your
> files could be thrown off by the hosting company.

after the damage is done.

> And, given that
> there's no simple alternative in a shared environment anyway (as the
> only way you can usually give access to the web server software to
> alter your files is to give access to everyone), it's a low-level risk
> that's commonly accepted in this kind of scenario.

No - I don't find this acceptable at all and is the primary reason we
don't offer open access shared hosting on our linux platform.

Having said that I'm no linux guru and I'm sure (well hope is more
accurate) the security model can be made to work in a satisfactory manner
- till then, we will only provide shared accounts on a Windows platform.

Now, I have no desire to start a religious war and will welcome any
constructive thoughts on the subject. In the new year I will be building
a test rig that only runs web site hosting, no db engine, no mail (except
that required to process contact forms) in an effort to focus attention on
the security aspects between user accounts. I'll probably base this on
Debian as it's the distro I'm familiar with. Having said that, site
developers (IME) tend not to care/ask about the o/s so maybe VMS would be
a better choice for an apache platform - or even (at the risk of upsetting
some) a Windows implementation. Both these alternatives appear to have a
much better security model for securing access between authorised accounts.

> The most important
> things to bear in mind are that you should never leave any sensitive
> data (such as passwords) in a file that can be modified by other
> people, and if the data contained in such files is important to the
> functionality of the site (such as a thread list in a forum) then you
> should take regular backups of it.

yes - this is integral to the mindset of admins but tends to be glossed
over by site developers who often seem to be blissfully unaware of the
issues.

--
William Tasso

Save the drama
for your Mama.
 >> Stay informed about: chmod and security 
Back to top
Login to vote
Baho Utot

External


Since: Nov 27, 2005
Posts: 36



(Msg. 12) Posted: Sat Dec 24, 2005 7:55 am
Post subject: Re: chmod and security [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Baho Utot

External


Since: Nov 27, 2005
Posts: 36



(Msg. 13) Posted: Sat Dec 24, 2005 8:55 am
Post subject: Re: chmod and security [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Baho Utot

External


Since: Nov 27, 2005
Posts: 36



(Msg. 14) Posted: Sat Dec 24, 2005 1:55 pm
Post subject: Re: chmod and security [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Display posts from previous:   
Related Topics:
CHMOD - I am working on a new website. It is WAY under construction. And I am having trouble with a script. That is related to the search feature at the bottom of the page. When I do the search I get the error.. Forbidden You don't have permission to access..

how do you pronounce CHMOD? - ?

Permissions and chmod - Hi, Can anyone help with this? When I upload a (usually php) program to my webspace I can happily set the permissions of the files. However, if the files have an install script, it will often change file permissions as part of the install. I can then....

Changing chmod in an advanced way? - Is there a program which can change the chmod settings on a automaticaly way? eg for jpg 664 for php 775 etc? Now i've to do it by hand, because filezilla set everthing on **0 There is somewhere a shareware program around, i can't find anymore.

Security of FTP - I'm working on a web site for a client. The site will be administered by someone else. This other person refuses me FTP access on the grounds of security and says any uploads can only be done by him via a secure machine with a static IP address - he ha...
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]