General :: Configuring Htaccess/htpasswd For Subfolders Only?

Dec 16, 2010

I have scripts in folders /opt/apache2/tools/ and also i have another folder called IDM under /opt/apache2/tools. i tried to configure htpasswd for just IDM folder only as below.

bash-3.00# pwd
/opt/apache2/tools
bash-3.00# ls -al

[code]...

View 12 Replies


ADVERTISEMENT

Server :: .htaccess And .htpasswd Not Working?

Feb 27, 2011

I have created a sub directory on my box on a website for my company. It is a page that has links to my tools I want to use when I do service calls. Links that connect to my servers webmin etc. Of course I don't want them found by webcrawling bots. I have created a .htpasswd file using htpasswd -c /location/to/file/.htpasswd.

This file is located outside the web. Just under the public_html folder. Then I went to the sub directory I want to protect and added a text file named .htaccess. It contains:

/home/sites/www.domain.net/tech/
AuthType Basic
AuthName "Some long name"
AuthUserFile /home/sites/www.domain.net/.htpasswd
Require valid-user
ErrorDocument errornumber /home/sites/errorpages/403.html

I also opened the httpd.conf and changed AllowedOverride to All

The error document doesn't work either.

I then restarted the httpd service. I try to access the site and it lets me right in without asking for a password. It is apache 2xxx on Centos 4.5. Webmin under Apache confifirms all this.

View 12 Replies View Related

Software :: Compatibility With Htpasswd And Htaccess On Asterisk?

Mar 4, 2010

Has anyone ever had any luck with htpasswd and htaccess on asterisk, I set it up on a test apache server in VMWare just to make sure I knew what I was doing, so It was a very basic html page that I used, however, when I go to implement it on one of my Asterisk Servers, It comes up with the following page after I type a user name and password credentials in:

***************************************************************************
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny4 with Suhosin-Patch Server at fred Port 80
***************************************************************************

Anyone know if its compatible? and if so, is there any tricks around this?

View 2 Replies View Related

General :: How To Rename All Subfolders With Specific Name

Jun 11, 2010

How to go through all the subfolders and rename all the folders named 'Old' to 'New'

View 2 Replies View Related

General :: List Of All Nested Subfolders With A Specific Name?

Jun 3, 2010

How to get a list of all the subfolders with a specific name
e.g. all the folders which their name contains 'NAME' code...

but this won't give me a unique list (if the folder has subfolders it gets listed multiple times)

View 1 Replies View Related

General :: Summarized Sizes Of Folders And Their Subfolders?

Jul 11, 2010

Let's say I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders.If I use df I get the size of each mounted file system but that also doesn't help me. And with du I get the size of each subfolder and the summary of the whole file system.But I want to have only the summarized size of each folder within the ROOT folder of the file system. Is there any command to achiev that?

View 4 Replies View Related

General :: Recursively Browse Subfolders In A For Loop?

Feb 19, 2010

I wrote a script for copying mp3 files to my girlfriend's mp3-player and it looks like this:

Code:
mount /dev/sdc /test -o sync
for i in *.mp3; do

[code]...

View 13 Replies View Related

General :: Group Permissions For Subfolders Only (CentOS)

Apr 19, 2010

Is there a way to allow other members of my group to access subfolders under my home directory, but not my home directory itself?I'm using CentOS 5.4

View 3 Replies View Related

General :: Get The Summarized Sizes Of Folders And Their Subfolders?

Aug 13, 2010

I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders. If I use df I get the size of each mounted file system but that also doesn't help me. And with du I get the size of each subfolder and the summary of the whole file system. But I want to have only the summarized size of each folder within the ROOT folder of the file system. Is there any command to achieve that?

View 3 Replies View Related

Security :: Htpasswd Allows Incomplete Password?

Mar 9, 2011

I've setup .htpasswd and a .htaccess file.

The password is a0bc0def0g3

If i enter that password, it let's me in.

if i enter a0bc0def0g it also works. I've never seen this before and is totally weird.

View 3 Replies View Related

Server :: Sync Md5 Password Between Php And Htpasswd?

Jul 6, 2010

I have built a subversion server (1.6.12 version) on Centos 5.4. I created a database for the server for authentication user via database MySQL with mod_auth_mysql, but this make my subversion server is so slow when make a commit.

I think authentication through a file is fast , but I wish to connect the password in database (the password is created by PHP) to file. I used a file like this user:xxx xxx is the password which is got from database. But it's not ok.

View 1 Replies View Related

General :: Code For Renaming Files With Prefix In Subfolders?

Feb 12, 2011

I want to rename files in multiple subfolders with a prefix (e.g., rename "file.tif" with "prefix_file.tif") and not have to be in the subfolder.

code: for f in /path/to/*; do echo mv "$f" "PRE_$f"; done

gives you this: mv /path/to/file1 PRE_/path/to/file1

instead I want this: mv /path/to/file1 /path/to/PRE_file1

View 3 Replies View Related

General :: .htaccess RewriteRule Map URL To Another

Apr 18, 2010

I've developed a web program and let say the main url is [URL]

I will be distributing different URLs for different customers and each customer will have their down database. Let say the URLs will be:

[URL]

because i be using single instance for my program, both this URLs will be pointing to the base code at http://domain.com. depending on whether is customer1 or customer2, the program configuration will extract from the respective database.

my question is, how do i use mod_rewrite to map the different urls to the main url with transparency. meaning, although each customer will see domain.com/customer1, this is actually pointing to the main base code at domain.com which has a config file to pick out the respective database.

I've managed to do it with alias in httpd.conf. e.g:

alias /user1 /var/www/html/myproject
alias /user2 /var/www/html/myproject

however, if i were to do this, i would have to restart apache every time i've got a new user. so i've decided to use .htaccess instead but realised that alias is not availble for it.

I've tried with rewriterule but with no success.

View 1 Replies View Related

General :: Copy A File To All Subfolders In A Directory Using A Single Command?

Jul 18, 2010

I'd like to copy a file, say widgets/water.txt, to all subfolders in the folder widgets using a single command. So if the folder widgets has 10 subfolders like widgets/blue, widgets/green, etc. I'd like to copy water.txt to all of them with one command.

I tried the commands

Code:

cp water.txt ./*/water.txt
cp water.txt ./*/

However these don't seem to work. The latter gives 'cp: omitting directory' errors.

View 7 Replies View Related

General :: Moving Files From Folders And Subfolders To A Specific Folder?

Aug 21, 2010

I am using secure delete to remove files from a Debian Linux PC. However, secure delete does not remove folders. This has lead me to look at writing a script that would move files to a predetermined folder for deletion. My plan is as follows:I have a folder on my desktop called shredder where I move the contents of the waste bin to. The script needs to identify all files within the folders and sub folders, within the shredder folder, and move each file to the shredder folder and then delete the folder. At this point secure delete can be used with a command like shred -v -u *.*on the shredder folder.The problem I have is in creating the code to move files from the different folders and then deleting the folders. Note that the names of the files, folders and subfolders will not always be known

View 12 Replies View Related

General :: Change A String Recursively In Files Located In Folders And Subfolders?

Jul 22, 2011

lets say I have a project that have generated lots of xml files. Though all these xml files point to a location with the text name TEXT15. I want to change all the files that containts TEXT15 and change it to TEXT16. This actually works for files in a folder but not recursively in all the entire files....perl -pi -c 's/TEXT15/TEXT16/g' ./* but I have many subfolders and within this more subsub folders....i just want to do this recursively.

View 2 Replies View Related

General :: .htaccess To Redirect All Requests To Another URL?

Apr 16, 2010

I would like to setup .htaccess to redirect every request to one website regardless of folder/filename combination to another URL.For example[URL]

View 1 Replies View Related

Server :: Use Htpasswd To Add Password To User And Store In /etc/vsftpd/passwd

Feb 4, 2010

I started to work on building a ftp by vsftpd in our lab (that's only for our lab members). I am going to setup some the virtual users for each of the member. We have a CentOS5 (without upgrade after the fresh installation). I try several ways to setup the vsftpd for virtual users. 1) with db4 2) with mysql 3) without database and use htpasswd. But all fails. Actually, I don't want to use database, so I am going to find out the reason of failure on 'htpasswd' method

My vsftpd is installed in /etc/vsftpd (for only using ftp account, it is no problem to login).

1) I setup an account called vftpuser and build the corresponding home (/home/vftpuser), and then I setup another account call usera and also create a directory within /home/vftpuser.

2) I use htpasswd to add passwd to usera and store the passwd in /etc/vsftpd/passwd.

3) I added the name of usera to /etc/vsftpd/user_list

4) I create a directory /etc/vsftpd/user to store a unique conf for each user (for usera, the conf named usera) which contains the local root for users, which is

[Code]....

View 1 Replies View Related

General :: Pcfg_openfile - Unable To Check Htaccess File - Ensure It Is Readable

Jul 8, 2010

After moving a website folder on my local development machine to another drive, then moving it back, I got a 403 error. Most of this problem had probably to do with rights that got messed up. After deleting the code and restoring it from SVN, the rights seemed allright. The error stayed however.

The setup is a bit complex, as follows:

I have Ubuntu 10.4 as development machine, trying to mimic the server as much as possible We use Eclipse + SVN and I create all projects in a local folder under my user account In /var/www-vhosts I create folders for each vhost, like this one: test.localhost test.local/index.php: includes the index file of the project
test.local/.htaccess is a dynamic link to the htaccess file in a project subfolder

I get the following error in the apache error log:

The problem seems to be the .htaccess file, or the link to it. When I empty the htaccess, nothing changes When I remove the link, the index-include produces some output (in the apache error log) When I remove the link and replace it with the actual file, I get another error:

View 1 Replies View Related

General :: Copying All .jpg Or .JPG Files From A Folder And All Its Subfolders To /usr/name/pictures Folder?

Sep 10, 2009

How would i go about copying all .jpg or .JPG files from a folder and all its subfolders to my /usr/name/pictures folder? I'm guessing I'd have to use some sort of .[jJ][pP][gG] to get all the pictures from other examples i've seen, but really not sure how to use that in a recursive cp.

View 14 Replies View Related

Ubuntu :: VSFTP + Pam Htpasswd + Virtual Users = "500 OOPS: Cannot Locate User Entry"

Feb 1, 2011

I followed the directions here: [URL] but now I get

Code: 500 OOPS: cannot locate user entry:music Login failed. I see no errors in my auth.log, and in my vsftpd.log I see Tue Feb 1 13:01:13 2011 [pid 2] CONNECT: Client "<omitted_ip>" Tue Feb 1 13:01:20 2011 [pid 1] [<username>] OK LOGIN: Client "<omitted_ip>" so it looks like the user is able to log in, but I can't tell what the issue is beyond that.

View 2 Replies View Related

Server :: Samba Is Not Displaying Subfolders?

Apr 28, 2010

I have installed Samba and the Guest only share i've created works, I can connect and view, edit, create, delete files fine... However...I can NOT see or create subfolders.Google searches and playing around for six odd hours and no success...

----------smb.conf--------------
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed

[code]....

View 52 Replies View Related

OpenSUSE :: 10.3 - Setting Permissions On Folder / Subfolders

Mar 18, 2010

I'm running OpenSuse 10.3 and I've tried to set permissions on my folder and subfolders from root:root to wwwrun:www. In the shell it shows all folders and files with the correct permissions, but in the GUI it still says root:root and so my web application can't write to it, until I manually set the subfolders permission in the GUI.

View 9 Replies View Related

OpenSUSE :: Setting Permissions For All Subfolders In Nautilus?

May 13, 2010

trying to set permissions on all subfolders by right clicking the top folder, permissions, setting the desired values, and then clicking the "Apply permissions to the enclosed files. It takes on the top Folder but not on any of the subfolders or their files.How can I set the permissions for all files and subfolders under a top level folder?

View 9 Replies View Related

OpenSUSE :: Cannot Make First Level Subfolders In KMail?

Dec 12, 2010

in Kmail 2.0.89 and the 2 or 3 versions before that, I have been lost theability to make a new subfolder under the category "KMail_Folders". I canonly make sub-subfolder under any existent one.The Add Folder entry in the menu is greyed when I am in the KMail Folders
level.Is that a bug or a feature? (I hope is not the latter...)

View 3 Replies View Related

Ubuntu :: List Folders And Subfolders With Size?

Jan 2, 2010

I want to list my folders and subfolders (recursive) and also show the size of the files in terminal. I started using this:

Code:
ls -h -R > /test.txt
I got everything but not the size of the folders.
Then I tried this:
Code:
du -h --max-depth=1 > test.txt

Suppose to show me everything, but I can't see subfolders. And this command do not accept recursive. How can I show the size of the files and folders like the second command, but including the subfolders?

View 5 Replies View Related

Ubuntu :: Copy All Files From A Folder And Its Subfolders?

May 30, 2010

i have a folder with 250 subfolders and each one of them has (at least) one image in it (along with other stuff)how can i 1)copy all the images from those subfolders and paste them into one folder together (other than by hand, obviously)?2)optional : copy only the images of a certain size and above?

View 2 Replies View Related

Server :: Imapd Mailbox Subfolders Creation?

Mar 25, 2010

I started to use mailboxes instead of maildirs on my server. My server is with imapd on slackware.I found out that by Thunderbird I just cannot create sub-folders in my imap directory. My users used to manage their mails into hierarchically organized subfolders.

View 3 Replies View Related

CentOS 5 :: WebDAV - Limiting Access To Subfolders?

Dec 13, 2010

On our web server I want to have a WebDAV folder and I would like customers to be able to log in with MySQL authentication from our customers database (this I have set up with no problems and it works fine). HOWEVER, I want each customer to have their own subfolder and, having logged in with access to the main WebDAV folder, I want each customer ONLY to be able to access their own subfolder(s). I don't mind them seeing other subfolders exist but obviously I don't want them to have access to other customers subfolders.

OK, of course I could achieve this by adding new WebDAV locations to the httpd.conf for every customer but with a large number of customers httpd.conf will become very large and messy. I have tried applying further restrictions by putting an .httaccess file in each subfolder but that doesn't work - indeed the presence of a .htaccess file oddly prevents users from seeing any other files in the subfolder but has no effect on the access.

View 1 Replies View Related

Ubuntu :: Mail Server SubFolders Not Consistently Visible?

Jan 6, 2010

I have a mail server running ubuntu 9.04 w/ the default setup (for the most part): Postfix + Dovecot + SSL. I generally use Ubuntu 9.10 as the client machine running evolution. I have a myriad of subfolders to the inbox on the server that I created in Evolution. Occassionally I do connect using another machine and use IMAP. In one instance I use the Windows 7 I have on the same machine (dual boot) and access the server. Most of the server's sub-folders are not visible but many are.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved