LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is the best website permission? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-best-website-permission-687920/)

RMLinux 12-03-2008 12:16 AM

What is the best website permission?
 
Hi Keen Buddies,

what is the right permission and ownership for your website?

I want to create a website that can accept download files?

thx.

Simon Bridge 12-03-2008 01:22 AM

Your question sounds confused. Possibly you are trying to achieve something by inefficient means?

Presumably, you want to allow users to download files from the website and/or to upload files to the website? This is usually handled in the dynamic content of the page itself.

You sound like you are trying to use unix permissions to restrict this, as if you had user accounts to the site - a bit like LQ?

RMLinux 12-04-2008 01:02 AM

Quote:

Originally Posted by Simon Bridge (Post 3362672)
Your question sounds confused. Possibly you are trying to achieve something by inefficient means?

Presumably, you want to allow users to download files from the website and/or to upload files to the website? This is usually handled in the dynamic content of the page itself.

You sound like you are trying to use unix permissions to restrict this, as if you had user accounts to the site - a bit like LQ?

thanks to your reply.

lets say I want them to uploads files to my website? what am I going to do?

Simon Bridge 12-04-2008 05:08 PM

There are a number af different ways to do this - are you looking for something like gnomelook.org? Or something more private?

Have a look at php.
http://www.tizag.com/phpT/fileupload.php

... for eg. A web form with a file upload button:
http://www.htmlgoodies.com/beyond/we...le.php/3548746

There are also methods for javascript,etc... if you want to use dynamic content on a web page you should learn one of these methods.

If it is just a bunch of mates wanting a central place to keep files... then consider something like an sftp server instead.

i92guboj 12-04-2008 05:46 PM

There are two separate issues. The first thing is the permissions at file system level in the system where the server is running.

A server (let's say apache) runs usually with a given userid. So, the permissions at file system level (those that you set with chmod) are only relevant for the apache user. If the user "apache" has +r on a given file, it will be able to serve. If the user "apache" has +w permissions on a file, it will be able to write into it. If the user "apache" has +x on a dir, it will be able to read and serve the contents of that dir (provided that the files inside that dir are readable as well.

However, how these permissions are handled by your served and presented to the world outside of the server is a completely different matter. The permissions at file system level are hard-requirements so apache can handle the files if needed. But then the scripts, interfaces, the server config and other stuff is what will decide if a given user, ip or whatever has the right to write on a given resource.

Ultimately it all depends on what exactly you are talking about. If you want frontends to upload and download files, try hotscripts.com and search around there. There are thousands of scripts in php, javascript and lots of other languages and most of them comes with installation instructions.


All times are GMT -5. The time now is 01:59 AM.