Chmod For Public_html And Other Folders
what should be ideal chmod permission for public_html and other folders.
is 755 fine ? what is most secure one
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Zipping Up Multiple Public_html Folders From Shell
OK so I'm on the shell and looking at the contents of my home/ directory which has all the various accounts. In each account directory are subdirs such as mail, logs, tmp, etc, and public_html. Is there a way (or a ZIP command) to be in the home directory and create a massive ZIP file containing all the account directories, each containing ONLY the respective public_html subdir for that account? Using the command "zip -r Backups.zip ./" seems to include all those extra folders (such as mail, etc.) that aren't needed.
View Replies!
View Related
Difference Between Www And Public_html
what is the difference between www and public_html? I have hosed my domain in a small hosting company and when i was going through all its folders i found both the folder www and public_html has the same content. but by hosting company asks me to upload all my files into public_html. Iam curious to know the difference between these two folders.
View Replies!
View Related
Change Public_html For IP Address
My server has one IP address assigned to it and i use Webmin with Virtualmin to manage domains. When you put my IP into a browser like [url]however, it points to my websites public_html folder at /home/username/public_html, which was the first domain i set up. I would like to change it so that the IP points to its own folder: /var/www/html when entered into a browser.. how do i do this?
View Replies!
View Related
Move Public_html Folder
I have recently registered a new dedicated server, I am trying to move some sites over. Essentially, what I am trying to do is copy the public_html folder from one server to another. I have root access on both accounts, I have managed to move the whole home folder from the old to the new, but I guess I would need to download all 2gigs worth of data then upload again, or is it possible to extract only the information you need from the compressed backup. I am thinking that specifying data from an uncompressed folder wouldn't be possilbe, so, is there a way of moving certain folders from one server to another via SSH?
View Replies!
View Related
301 Redirecting To Public_html
I'm currently using this in my .htaccess: Code: RewriteEngine On rewritecond %[url] rewriteRule ^(.*) [url] I have this in my root (public_html) folder. However when you go to [url] it redirects you to [url] I'm already in the root. Why would it try to go to public_html/public_html? What's the correct implementation of this .htaccess?
View Replies!
View Related
Tar Public_html (cPanel To DirectAdmin)
I wanted a move 1 accounts from cPanel to DirectAdmin server platform. I know it has to be done manually. But this one account has 800MB. So the question is: Is it possible to tar public_html while keeping every permission & folder ownership at it's correct setting? (Sql is not a problem for me)
View Replies!
View Related
Chmod
I have a server running php 5.2.4 with CGI as Server API and suexec, but I cant create dirs in php with chmod 755. When I use mkdir("/home/user/public_html/$dirname", 0755); it creates the dir with chmod 744. Why? I can change later this chmod to 755 in php with the chmod function. But why my server doesnt allow the directory to be created as 755? Where can I configure it?
View Replies!
View Related
Apache 2.2 DocumentRoot /home/user/public_html Not Exist
I am getting this error and I just installed apache 2.2 and added a user using useradd user. When i added into the virtual which is: NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /home/user/public_html ServerName user.com </VirtualHost> It does not find the public_html folder I added. Is this a permissions problem? or something else?
View Replies!
View Related
Chmod Using Shell
I was wondering if it were possible to chmod a directory that is set to a low number to 777 using a shell or command and if so can anyone point me in the right direction as to how to go about doing so ??? I am trying to learn a little and i pefer using my browser to edit files rather then a ftp client.
View Replies!
View Related
CHMOD For Files
I just moved my folder_A from computer A to computer B, what is the command to change the permission of owner, access, group for every files in that folder_A at 1 time? in the folder_A has hundred of files. Let's say , i want to change owner = laptop, access = read and write, group = user, access = read and write , what is the specific command to do that for all the files in folder_A at 1 time?
View Replies!
View Related
How Do You Avoid Using Chmod 777
I know you're not supposed to use 777 but it seems some scripts just simply won't work without it, what steps needs to be taken to avoid using 777? as far as i understand we're only supposed to use 775 for folders and 644 for files correct?
View Replies!
View Related
Chmod 777 Vs 755
I've just moved from a reseller account with ResellerZoom, so a VPS with SolarVPS. When I was with RZ all my scripts could write to folder with the 755 permissions. On the vps I have to alter the folder I want the script to write to to be 777. Which the is best and most secure? I think I understand that if a folder is 777 then anyone on the server can write to that folder. So I assume some sort of thing that stops users being able to access folders outside of their own folders is needed? is that right?
View Replies!
View Related
How To CHMOD? Sever Security Best Practices
I have my web server hacked several times and I am beating my head against the wall trying to find the problem(s). Way back when my sites have been defaced and CHMODing my *.html files to 744 seemed to have done the trick Now someone has put a phishing site somehow, which by the way I'm not able to remove still, I can't help but to think that I may have more CHMODing to do, I have recursevly set my site to 755, shoud this do the trick? I know I need to chmod .htaccess and alike files to 644, but what about...imagesCGI/PHP?cssetc? What other steps can I take to secure this thing? it's a shared host, limited access, but I do have SHELL.
View Replies!
View Related
Auto CHMOD Script Running In The Background
I am attempting to setup a script which will automatically append the proper file permissions [posix & acl's] to any new files on certain folders that I specify. Someone Recommended find /Users/Kevin/Desktop/TRANSFER -type f -exec chmod 777 {} ; This only seems to run once and when new files put in I have to have the script run every so often as a cronjob, I really just want to have a script to change the permissions of files going into a folder.
View Replies!
View Related
Chmod Choices With Php Writing To A File
My account has been hacked with every index.php page defaced. I've cleaned up and my shared wehost is pointing at me saying there shouldn't be any 777 permissions for any files in there. I used 777 to allow php to add records in a txt file and in an xml file. Is there a better / more secure chmod code I can use? Those are the only two instances where I need php to write to a file and those files shouldn't be served to anyone, I do not want anyone to be able to access them. How can I secure them while letting php write in them?
View Replies!
View Related
Chmod All Occurances Of A File System Wide
How do I sweep my entire server and chmod a particular filename located in the cgi-bin to either 0, 755, etc? For example, to disable a particular perl script running on my system on over 100 accounts in the /cgi-bin/file.cgi I want to chmod the file on every account that it comes up on that /cgi-bin/file.cgi needs to be chmod'd to 0. Anyone know how to do this thru ssh or another method?
View Replies!
View Related
Cannot Perform 'chmod' On FTP Client Software Interface
I got a VPS with Linode and I have installed CentOS 5.2 32-bit, Apache, MySQL and ProFTPd. The server itself runs very OK, however, I have issues with running 'chmod' on the user interface with either FileZilla or CuteFTP pro. Whenever I try to chmod 777 on a directory, I got this error on the FTP client interface: Quote: Command:SITE CHMOD 777 includes Response:550 CHMOD 777 includes: No such file or directory Why no such file or directory? weird. It's just on the server though. The FTP user is the owner/group of the directory I try to chmod to. But I am able to run chmod on Putty.
View Replies!
View Related
PHP: Uploading As Apache User, And Chmod 600
I've recently moved to a new server in which I don't have root, so bare with me. For some reason when I upload a file with 'move_uploaded_file($tmpName,$new_filename)', it seems to work fine - but when I check it, try to download it (http or ftp), or change the permission - I can't, because its set to 600 for some odd reason, and owned by the user Apache is setup on.
View Replies!
View Related
C99Shell Folders?
I found these folders in the root /usr/bin/c99 /usr/include/boost/numeric/interval/detail/c99_rounding_control.hpp /usr/include/boost/numeric/interval/detail/c99sub_rounding_control.hpp what are these ? is it normal folders ? or somebody hacked our server? what shall I do?
View Replies!
View Related
Nobody Folders And Delete
when people run a forum and the template and forumdate folders may created some files with nobody permission, the user could not delete them by the user themself, and need admin login as root with ssh to delete those, and let the files permission can run as the user instead of nobody. the server is centos with cpanel and suexec.
View Replies!
View Related
.htaccess And Folders
In the public_html directory, I have php_value user_agent "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" <IfModule mod_security.c> SecFilterScanPost </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / Errordocument 404 /404.html RewriteCond %{REQUEST_FILENAME} !.(jpg|jpeg|gif|png|css|js)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php [L] </IfModule> Then I created a new directory named caller There is an exact same .htaccess in public_html/caller However, the .htaccess in the public_html directory rewrites all request to index.php .htaccess in public_html/caller rewrites all request to /caller/index.htm The thing is when I access [url] whatever the one that's called is /public_html/index.php How can I arrange so that the one called is /caller/index.htm?
View Replies!
View Related
How NOT To Require CHMOD 755 Permissions To Create, Write And Delete Files On Linux
On my previous server and on some other hosts, I was able to write to files (for example with PHP) without having to chmod the files first. Now I cannot, and files are required to be chmoded properly so I can write to them. I cannot even touch() a file with PHP. Is there any way to have this permissions removed? I don't want to chmod the all thing, all I want is to change the configurations so I can fwrite() or file_put_contents() normally. I's a dedicated un-managed server, so basically any advanced configurations can be done.
View Replies!
View Related
IIS 5.1 - Browsing Folders
Well I finally got around to getting my IIS up and running which will save some time with uploading various files to check that they are working correctly but now I have run into a new problem. What used to happen with my IIS is it would list out all of the folders which I had in the wwwroot and I would simply navigate through and select which site needed to be tested. At the moment, I have cleared out the wwwroot folder entirely since all of the stuff in there was to do with a "Windows XP Professional" page which appeared upon installation. However, now that I don't need it anymore, I decided to clear it out and test IIS out by making a new folder called "sites" into wwwroot. Now though, it simply comes up with a "Directory Listing Denied. This Virtual Directory does not allow contents to be listed." error message, even though I have changed the permissions on the wwwroot folder to allow writing etc. Could this be because it's IIS 5.1 and I need to install IIS 6.0 instead or is something else wrong? I know for a fact that my operating system (Windows Media Center Edition 2005) will do this list as I have had it before, back before I installed Vista and then decided to come back to MCE.
View Replies!
View Related
Emails Going To SPAM Folders
I can send e-mails out but many times they go directly to the recipient's SPAM box. Also, my server cannot send to any company e-mail that uses MXLogic.net's services. Going to [url]<--My server IP is on ZERO blacklists. /etc/resolv.conf appears correct /etc/hosts also appears correct Is there something that I am overlooking?
View Replies!
View Related
Accessing Shared Folders
I have server which all files and folders are stored on. Now there are a couple of folders which are only accessible by one machine at present and all the other machines when they access the folder it is displayed as empty. I have checked all permisions and all machines viewing of files settings are the same and folders accessible by all machines have the same settings as the couple which are only accessible from this one machine. If I copy and paste the folder all machines then have access to the folder from although this would be a lengthy exercise for the full hard drive.
View Replies!
View Related
Folders Display Permissions
I would to know how I can change the display permissions for my website sub folders and files from public view, for instants The current is you can access to any folders or files once trying access to any folders in my website like open this link www.yoursite.com/photos/ will see all sub-folders and files in this “photos” folder also you can see the other folders in another level by going to the top level folders! but I think there is a way to enforce my users to write the full path of any selected photo or file they want without browsing my folders and sub-folder.
View Replies!
View Related
Mystery Folders Being Created
I am designing a site for a client and in all the years I've done design etc, I've come up against a phenomenon with their VPS server they have. It's linux and uploading files I am using WS_FTP Home. I am uploading files and folders to their public_html/domain.com/ (*I use domain here for their privacy) and in some folders (directories) after doing so, a mystery folder suddenly appears that is named 5" and as you enter that folder, you see the path directory show up "public_html" and if you go into that one, you come up to the domain.com folder again, and if you deeper into that one you start to see this phenomenon of mirroring folders of the one you go into. Example: public_html/domain.com/images/5"/public_html/domain.com/images/file ***the file whether it's an image jpg, png, etc is created as the last directory as a folder, not a file. I should also mention that as you go deeper in the 5" mystery directory folder, you no longer see the path in the FTP anything past the 5" one even as you go further in. Oh, and it doesn't allow you to delete these 5" folders regardless of what permissions. And this folder seems to show up in many areas of this website's directory structure...mostly where images are (don't know if that is just a coincidence). So hope all this makes sense....anyone seen this before and what the cause could be? Their host doesn't seem to know the reason and says they cannot see it even though others can. They said it's the FTP program as the cause and not their server. My comeback to that is that I've used this FTP for years and never before seen this happen. It's only with this one client's server.
View Replies!
View Related
SSL Certificates Works For Folders?
Say i have domain zzzzz.com and have some folders say a, b and c would ssl if installed for main domain zzzzz.com work for https://zzzzz.com/a and so on ? or would wildcard ssl be required for that ? And what if that /a folder is actually a subdomain, but since you can access subdomains via url/folder instead of folder.url would ssl work on it using url/folder option instead of subdomain url ?
View Replies!
View Related
Deny Perl In Public Folders
How do you guys deny run of perl/bash scripts from /tmp, /var/tmp, /dev/shm? I've tried to build simple shell wrapper, but that's not a compromise if you run for example spamassassin on the same server (it needs direct io to/from perl binary). I'm looking intro some kind of binary wrapper or patch that will deny running perl scripts from public folders (also the same for shell scripts will be great). Any ideas or solutions? If anyone interested in primitive shell wrapper code: Code: #!/bin/sh ARGS=`echo $@ | grep -v "/tmp/"` if [ "$ARGS" != "" ]; then /usr/bin/perl.orig $ARGS; fi
View Replies!
View Related
Access Folders In Root / Bypass Wordpress
My blog is set up to display in the root of my domain, although the files on the server sit within their own folder: i.e Server files Public_html/wordpressfiles/ Broswer displays www . mydomain . com/ (disaplys pages from /wordpressfiles) The problem I have is that I can't access individual directories within the root, unrelated to wordpress. e.g I have Public_html/folder2/... Setup on the server, but if I enter the path in my browser: www . mydomain . com/folder2 wordpress thinks I want to access: www . mydomain . com/wordpress/folder2 ...which doesn't exist. How can I re-gain access to folders in the root, without wordpress interfering?
View Replies!
View Related
Removing Large Files Or Folders CentOS
Something weird happening here. I have tried every string possible... There are a number of folders I want to remove off my server, tried the good old and simple... rm -r /folder/ And then went and ended up with a string as long as my screen. No matter what I do, as it goes recursive in to the directory it asks me if I want to remove each file individually. No matter what string or action I take it insists on asking me as it goes to delete each file. Could this be a configuration option in CentOS?
View Replies!
View Related
Addon Domain, Cant Have Password Protected Folders
I have 2 domains on 1 account. My main website is www.aviationcafe.net and i added on www.modelcuir.com thats what it looks like to the public. But with my host it will be www.modelcuir.aviationcafe.net. I noticed in the files area that modelcuir is it's own file, i can password protect that but it will stop people getting onto the website completly and i only want to stop them getting into the members area. I can't create a members area either unless i can add a new folder which i can't i dont think.
View Replies!
View Related
Apache 1.3 For One Site, Two Cgi-bin Folders
my server has just one site, apache conf has such a line: Code: ScriptAlias /cgi-bin/ "/usr/local/apache/htdocs/cgi-bin/" and Code: <Directory "usr/local/apache/htdocs/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> then, my cgi script may run well under the said folder, /usr/local/apache/htdocs/cgi-bin but I have another script need to be setup another cgi-bin under its own folder below htdocs folder, like, /usr/local/apache/htdocs/anotherscript/cgi-bin however, when I run the said script in browser: Code: http://www.mydomain.com/anotherscript/cgi-bin/abc.cgi the browser just shows source codes, instead of running it. I am guessing something wrong in httpd.conf, may I know how to set apache httpd.conf to meet my requirement?
View Replies!
View Related
Copy Newly Created Folders In /tmp
We've had someone starting nobody PERL procs on a box and we can't quite track it down or read the file to see what it is. What he does is to create a folder in /tmp, execute the script from there and delete the folder as soon as it's running (yes, /tmp is mounted noexec, makes no difference). We've managed to discover and block the IP that was doing this, but that's no fix. He hasn't been back since banning the IP...so far. What we would like to do is see if anyone knows of (or can help create) a script that can watch the /tmp folder and copy newly created directories and thier contents to another dir (also notifying via email would be helpful) in order to see what the heck it's doing, and hopefully be able to figure out how it's getting in. Nothing in any logs this time, and the PERL process seems to be able to hide itself from PS. That bit worries me quite a lot, but none of the binaries appear to have been changed, and it doesn't appear we've been rooted in any way. Thoughts on this, ideas and suggestions welcome. Failing that, is it possible without breaking the box to prevent the creation of new directories in /tmp? This I seriously doubt, but if all they need to do is create a folder and work from there, noexec is a joke.
View Replies!
View Related
|