1
paulohsf
How can i protect a file?
  • 2005/7/1 2:06

  • paulohsf

  • Just popping in

  • Posts: 10

  • Since: 2004/11/25


What can i do to make a file acessible only to registered user of my site?

2
jdseymour
Re: How can i protect a file?

Whatever module holds the file just give module access to the registered user group in System Admin - Groups.

3
psindia
Re: How can i protect a file?
  • 2005/7/1 8:20

  • psindia

  • Not too shy to talk

  • Posts: 171

  • Since: 2005/3/31


If it is a seperate php file

the add thecode

if(!$xoopsUser)
 { 
redirect("http://yoursitename"); 
}


Quote:

paulohsf wrote:
What can i do to make a file acessible only to registered user of my site?
Please don't visit ==>tenthstone.com!
==>vinodsr.com!

4
paulohsf
Re: How can i protect a file?
  • 2005/7/1 18:51

  • paulohsf

  • Just popping in

  • Posts: 10

  • Since: 2004/11/25


The files are not inside a module. They are inside the public_html directory or inside others directories outside modules.

So please detail how can i protect the files and/or the directories to be acessed only by the registered users.

5
Ciinien
Re: How can i protect a file?
  • 2005/7/4 2:46

  • Ciinien

  • Just popping in

  • Posts: 2

  • Since: 2005/6/29


Quote:

paulohsf wrote:
The files are not inside a module. They are inside the public_html directory or inside others directories outside modules.

So please detail how can i protect the files and/or the directories to be acessed only by the registered users.


jdseymour answered this above. If you have XOOPS files scattered all over your directory hierarchy, you are creating far more headache for yourself than necessary. This is not an Apache or Linux permissions issue, it is a XOOPS issue. Read the XOOPS docs and figure out how to create groups if you haven't done this already, then assign priveleges accordingly. If you have read those docs, apparently you misunderstood something and should re-read them until they are clear to you.

Securing files at the Linux or Apache level impacts the overall structure of your web site itself. Neither of these products knows or cares about Xoops--to them it's just another application running on your system.

Cheers!
Ci

6
Shine
Re: How can i protect a file?
  • 2005/7/4 8:55

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


Quote:
jdseymour answered this above. If you have XOOPS files scattered all over your directory hierarchy, you are creating far more headache for yourself than necessary. This is not an Apache or Linux permissions issue, it is a XOOPS issue. Read the XOOPS docs and figure out how to create groups if you haven't done this already, then assign priveleges accordingly.


Sorry to say but this answer is some sort of too simple. Securing files isn't just a matter of XOOPS permission(s).
Let's say you have files (zip,tar, pdf etc.) within an directory and offer them for download, these files aren;t protected at all. The person can see from where he/she grabs the file(s) and can send those links without any problem to another person who isn't a registered user. This user can acces those files without any problem.
I think this is meant within the question of the original poster.
How to protect those files for none registered users.

Grtz., Shine

Login

Who's Online

174 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 174


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits