Solved

Able to copy and write to files with mount -t smbfs shared folder but not with apache user.  I mounted with user apache but still cannot copy files.  Need help ASAP

Posted on 2006-11-24
6
282 Views
Last Modified: 2010-04-20
I mounted share directory with mount -t smbfs -o usrename=apache, password=apache, fmask=777,umask=000,dmask=000  source  destination

The mount is successful and can see directories and files.  I can copy files to and from with root in linux but when I log in as apache it gives me permission denied.  i am trying to copy files via httpd which has apache userid.  Need help ASAP.
0
Comment
Question by:Scryptions
6 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 18010204
Do you have  SELinux enabled?

If you do a ls -l on the mount point who owns the directory and what the permissions?

0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 18016974
Hi,

It seems that the owner of the directory is notthe user apache and then again you don't have permission to write in there.

You'd better check your /etc/samba passwd file to see what your users are mapped in linux. Change file and group permissions as required. Though I won't succest you to do thet you can change the directory prrmission to 777 for testing purposes only but I would definitely nto sucggest you to leave it this way.

0
 
LVL 1

Expert Comment

by:saaas
ID: 18019526
change the  source dir ownership to apache

chown -R apache <dir name>  
0
 

Author Comment

by:Scryptions
ID: 18020830
I have found the solution.  This is pretty bizarre.  When adding samba user thru command line and mounting, no permissions were given but when I removed the user from command line and then added it in the GUI interface it worked fine.  I am not sure why the command line did not take effect.  I stumbled on this when I was configuring apache.  I had configured the .conf file but it was still not working properly so I removed what ever was in the GUI interface and then restarted and it came up fine.  There seems to be an issue with the GUI and the command line.  Thanks everyone for your help.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18298258
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now