Some site design questions by a beginner.

parkourmumbai

New Member
Messages
34
Reaction score
0
Points
0
Hi, I am a beginner, and am putting up a website for the first time. I have quite a few questions, some of which might seem too childish to you guys, and I'll be adressing them one by one. Please bear with my foolish questions, and I would really appreciate any help.

First, I would like to know what the 'execute' permission setting exactly does. I mean, you've got read and write permissions, so what does 'execute' do? Is it similar to the 'read' permission? Is it related to executing php/perl scripts, and if so, does that mean I have to enable it for visitors who are visiting those webpages that need to run php scripts? And what is the difference between 'user', 'group', and 'world'? Am I right in assuming that 'user' is the admin who runs/puts up the website, and 'world' is the regular web visitor who visits the webpage? If so, then who is 'group'?

Second, what is the difference between the folders 'public_html' and 'www'?
Any file/folder that I seem to create in one is automatically copied to the other, and they reflect the changes made to the other in real time. If they are the same thing, what is the sense of having two different folders for the same thing?

Third, I am not familiar with Linux file systems, and file paths, they seem to be a bit different from the windows file paths. I created a folder called 'media' in the public_html folder, for storing my pictures. Now, in my webpage, I gave the appropriate path to the image files, in the format -
Code:
<img src=media\image.jpg style=" width: 320; height: 213">
I logged out of cpanel and all x10hosting accounts, and then opened the webpage in my browser (IE7). All the images showed up fine. But the same images never showed up for any of my visitors, using any browser. I tried to get them to use different browsers but they got the same result each time - only the image placeholders were loading, but the images didn't come up, they got a red 'x' mark in place of the images. I tried opening the page from my end again, but like before, I could load the page perfectly, without having logged into cpanel. Now I think this might have been a permissions issue, but I checked the permissions for both, the media\ folder, and all the images in it, they all were set to '644'. I shifted all the images to the public_html folder, and then they began showing up fine for everyone.
What could have been the problem here?
Also, when storing my files in different folders, what permissions should I set to the folders and the files so that web visitors cannot access my folders themselves, but can access the files in them? Also, what file paths should I use in the html code? I assume the file paths here would be different from what are used in windows.

Fourth, I have an ad-free account, which gives my 300 MB of storage space.
Yet, when I go to the upload file page in file manager, it says that the space I have available for uploads is 50 MB only. Is there some error on the site, or do I infact have only 50 MB of webspace on this hosting account instead of 300 MB, or does what is written on the page mean that I can only upload 50 MB of data at a time, through that page?

I have more questions, but I'll post them later, in the same thread. For now, I would really appreciate if some knowledgable person helps me out in my above doubts.
 

deaddevil

New Member
Messages
1,010
Reaction score
0
Points
0
"Fourth, I have an ad-free account, which gives my 300 MB of storage space.
Yet, when I go to the upload file page in file manager, it says that the space I have available for uploads is 50 MB only. Is there some error on the site, or do I infact have only 50 MB of webspace on this hosting account instead of 300 MB, or does what is written on the page mean that I can only upload 50 MB of data at a time, through that page"
-- For the above question the answer is ->you have 300 mb space, no mistake.



The 50 mb limit that you see is the file upload limit.
It mean you can upload not more than 50 mb at a time.

I'll answer the other question later....
 
Last edited:

parkourmumbai

New Member
Messages
34
Reaction score
0
Points
0
Thanks for the response deaddevil.

Guys, I still need answers to the rest of my questions. I'm stuck without them, and I need to get my site up soon.

Thanks in advance.
 

deaddevil

New Member
Messages
1,010
Reaction score
0
Points
0
YOUR QUESTION
"First, I would like to know what the 'execute' permission setting exactly does. I mean, you've got read and write permissions, so what does 'execute' do? Is it similar to the 'read' permission? Is it related to executing php/perl scripts, and if so, does that mean I have to enable it for visitors who are visiting those webpages that need to run php scripts? And what is the difference between 'user', 'group', and 'world'? Am I right in assuming that 'user' is the admin who runs/puts up the website, and 'world' is the regular web visitor who visits the webpage? If so, then who is 'group'?"

MY ANSWER
Read allows users to only read and not make changes to the content.
write allows scripts and users to make their changes to the contents.
execute relates to executing scripts on your website.
I do not understand why the users will need to execute php scripts ???
but surely to execute scripts you need to enable execute.
your differences are wrong.
Relating to forums -
USER are the users visiting the website and are registered at that particular site.
GROUP are the members of the forum who are in a specific group like moderators, graphic designers etc.
WORLD - related to all users on a site at a particular time, that is all visitors registered and un registered and guests.
Administrator may be a group on your forum but depends on the one who sets up the forum.


ALSO you need not worry about 'public_html' and 'www' just work in any directory it will not harm your site in any way.


I will answer the other questions later.
If you have any issues with your site or any question feel free to ask, PM me no Issues.. always helping.
 
Last edited:

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
Also, when storing my files in different folders, what permissions should I set to the folders and the files so that web visitors cannot access my folders themselves, but can access the files in them? Also, what file paths should I use in the html code? I assume the file paths here would be different from what are used in windows.
You can skip about perms, you can just upload a blank index.html in the folder that you don't want listed. It'll just display a blank page.

If you're feeling adventurous, you may want to do a bit of reading about htaccess (x10 is very permissive about this, something I like a LOT).
 

Thewinator

New Member
Messages
256
Reaction score
0
Points
0
For your img question I would try quotation marks and px in the style
<img src="media\image.jpg" style="width: 320px; height: 213px;">
Don't know if that is causing it.
The default permissions are just fine for images however, so thats not the problem.

As for the three groups its from the servers perspective!
That means:
USER - The user logged into linux at the moment.
GROUP - Certain linux group(s) that should have other rights.
WORLD - All users not logged into the linux shell, that makes everyone visiting your site.

The only way your able to access USER is by running linux commands or crontabs or stuff like that.

Wich bringes me to your execute point. Execute is indeed for scripts, but not php. Its for stuff like .exe and .bat in windows or shell files in linux. (There's more types that includes that but you'd have to google that)
 
Last edited:

parkourmumbai

New Member
Messages
34
Reaction score
0
Points
0
@Thewinator, so does that mean that, effectively, I can deny 'read', 'write' and 'execute' access to both 'user' and 'group', and only permit 'world' to do anything, and my site should still run fine with these settings? Because even I, as the admin, am logging into it through the web-based cpanel.

Is it allright if I use the single quotation mark in the html tags (for the image source) instead of double quotes? Because php won't permit me to use double quotation marks for tag attribute values.

You mentioned something about 'includes'. I do have an include file in each of my webpage that calls for the page header and footer, so does that mean I have to enable the 'execute' permission for all those pages?


@Slothie, you say that I have to put a blank index.html file in the folder that I don't want listed. Will it make the entire folder and its contents inaccesible, or will it only make the folder itself (root\folder\) inaccesible, but will permit all web visitor access to the files contained in the folder (root\folder\files.extension)
Also, is there any other, better way to lock the folder from being accessible?

I also need to know, that if I create a folder for just storing my include files, and I lock both, the folder and the include files in them from being read/written by the public, will the include files be still called upon by the webpages requiring them that are allowed to be read by the public? Or will it just show the content of the pages without the content of the include files?
 

a-a-a

New Member
Messages
20
Reaction score
0
Points
0
Quote marks isn't necessary unless you're making it xhtml/validating it. (Though it's kind of bad programing..)
If you're including html in php, you can use \ to escape the ". Though ' should be okay too.
The image thing. Maybe do <img src=/media/image.jpg width=320 height=213>
With the right slash and not using style to do the width/height. I don't know if there's a difference between using style or just doing it that way.


"

@Slothie, you say that I have to put a blank index.html file in the folder that I don't want listed. Will it make the entire folder and its contents inaccesible, or will it only make the folder itself (root\folder\) inaccesible, but will permit all web visitor access to the files contained in the folder (root\folder\files.extension)"
What a black index file does is it doesn't show all the files in the folder when you go to the folder. Instead, you see a black index file. (Without it, you can see all the files that are in the folder, and access them)
It's easy way to 'hide' the files you have, without going to much trouble, since you're only hiding images.
For restricting visitors from viewing the files, you'd need to do something else. Which I don't know how to do. ^^'
 

Thewinator

New Member
Messages
256
Reaction score
0
Points
0
@parkourmumbai no I meant the verb to include not the php function include(); ;)
Also you could replace your echo or print's quotation marks with single ones like this:
echo '<img src="hax.jpg" alt="single quotation marks">';

or like a-a-a said escape them like this:
echo "<img src=\"hax.jpg\" alt=\"escaped quotation marks\">";

@a-a-a I can't believe I missed that wrong slashes thing!
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
First, I would like to know what the 'execute' permission setting exactly...
You need not set chkmod for PHP scripts. For Perl, you would need to place the *.pl script in you cgi-bin and set it to 755.


Second, what is the difference between the folders 'public_html' and 'www'?
One is a folder and the other is a shortcut.


Third, I am not familiar with Linux file systems, and file paths, they seem to be a bit different from the windows file paths.
When in dount right click the red cross (in place of the image) and check its properties.


Also, when storing my files in different folders, what permissions should I set to the folders and the files so that web visitors cannot access my folders themselves, but can access the files in them? Also, what file paths should I use in the html code?
chkmod 711 should work to bring up a forbiden error for folders.
A better way would be to have a index.html in there with a page that has similar formating to the webpage.


Fourth, I have an ad-free account, which gives my 300 MB of storage space.
Yet, when I go to the upload file page in file manager, it says that the space I have available for uploads is 50 MB only.
Ask about this in the "Free Hosting Forum", but I am sure you have what you signed up for. Check in your cPanel for bandwidth, disk space and usfull stats.
 
Top