Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by rwniceing
at 2024-08-26 02:00:17
Point:500 Replies:6 POST_ID:829201USER_ID:12079
Topic:
Linux;;Apache Web Server
Now I would like to open my VPS site to visitor. Before doing that, I need to
set all my directories and files to be read only (including download file from visitors).
And I know if don't put any index.html or inde.php at the directories, it will
show the directories content such as file tress on browser. How to not to read the file trees by visitor.
Is there any existing linux script doing for ALL change the read mode with my user group for all
file and directories and its sub-directoried under my VPS user account directory when visitors visit my site and the script meets the requirement mentioned above ? SO I need to take use
chgrp besides chmod command in the script.
For uploading file from visitors, do I need to set write and read for the uploading directory
in my server, how ?
Please advise
Rwnicewing
set all my directories and files to be read only (including download file from visitors).
And I know if don't put any index.html or inde.php at the directories, it will
show the directories content such as file tress on browser. How to not to read the file trees by visitor.
Is there any existing linux script doing for ALL change the read mode with my user group for all
file and directories and its sub-directoried under my VPS user account directory when visitors visit my site and the script meets the requirement mentioned above ? SO I need to take use
chgrp besides chmod command in the script.
For uploading file from visitors, do I need to set write and read for the uploading directory
in my server, how ?
Please advise
Rwnicewing
Author: rwniceing replied at 2024-08-30 21:42:41
Thanks for your reply
Assisted Solution
Expert: gheist replied at 2024-08-29 17:25:00
125 points EXCELLENT
You can chroot their sftp account. Or FTP account... as you prefer. No need to change permissions.
Assisted Solution
Expert: serialband replied at 2024-08-29 12:44:13
100 points EXCELLENT
It's subtracting the w or write from group and other without changing the other permission bits.
It could be 755 or 744 or 711 or 700, depending on what you had before.
What do you mean exactly? Do you want to disable directory listing? Then you remove the read bit but leave the execute bit for the directory. The files should still have the read bit. Set the directory to 711 but leave the files with 744. If you have scripts, you may need to set those files to 755. That's why you use the g-w, o-w options to only remove the write bit.
It could be 755 or 744 or 711 or 700, depending on what you had before.
What do you mean exactly? Do you want to disable directory listing? Then you remove the read bit but leave the execute bit for the directory. The files should still have the read bit. Set the directory to 711 but leave the files with 744. If you have scripts, you may need to set those files to 755. That's why you use the g-w, o-w options to only remove the write bit.
Author: rwniceing replied at 2024-08-29 07:02:20
g-w and o-w is equal to 744 or something else ?
how to not to show file directories tree on browser if the index.php or inde.html is not existing on
those directories ? For example, when you type http://,mysite.com/php/store/ , it will show the
directory or file tress on browser since there is no any index file.
how to not to show file directories tree on browser if the index.php or inde.html is not existing on
those directories ? For example, when you type http://,mysite.com/php/store/ , it will show the
directory or file tress on browser since there is no any index file.
Assisted Solution
Expert: serialband replied at 2024-08-29 06:45:36
100 points EXCELLENT
If I'm reading correctly, I believe you just need to use the -R option to chgrp and chmod to change it for all subdirectories.
Change the group to your home folder and everything under.
chgrp -R My_Group ~
Remove write permissions from the group and other in your home folder and everything under
chmod -R g-w,o-w ~
Change the group to your home folder and everything under.
chgrp -R My_Group ~
Remove write permissions from the group and other in your home folder and everything under
chmod -R g-w,o-w ~
Accepted Solution
Expert: Wilder_Admin replied at 2024-08-29 04:14:02
175 points EXCELLENT
the easiest way when you do not have a security concept is to login by ftp on your server to set the permissions and to test. you can use www2ftp.de for example.
The security concept is user group anyone means the first number is the permission for users the second for the group and the last for every one normally you should set 750. So you can still have full access the group normally the apache group has only read execute and anonymous 0
You can read how to do: http://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver
The security concept is user group anyone means the first number is the permission for users the second for the group and the last for every one normally you should set 750. So you can still have full access the group normally the apache group has only read execute and anonymous 0
You can read how to do: http://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver