LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-11-2010, 03:22 AM   #1
vikki
Member
 
Registered: Jun 2009
Posts: 30

Rep: Reputation: 18
Cant write to Samba Share using PHP IDE


I have a Samba Share which is mounted on various linux systems throughout the network. Whenever any of my user access those files using vim, Gedit it works fine and get perfect permissions to read/write those files. but whenever they try to open with any php IDE (quanta plus, geany, eclipse-pdt) they get error while saving those files. I dont think it is a permission or samba issue because we are able to edit/save those files using normal editors..

Kindly suggest
Thanks in advance

Arpit Tolani
 
Old 06-11-2010, 03:50 AM   #2
tracertong
Member
 
Registered: Jun 2010
Posts: 34

Rep: Reputation: 16
When they open them, themselves, they'll be using their own permissions, but PHP will be running as the Apache user, surely?

Edit: Ignore that, i just realised what you meant.

So what does the error say? That sort of thing can be informative .

Last edited by tracertong; 06-11-2010 at 03:56 AM.
 
Old 06-11-2010, 04:44 AM   #3
vikki
Member
 
Registered: Jun 2009
Posts: 30

Original Poster
Rep: Reputation: 18
It just says that
You dont have permission to write in the file, whereas i am quite comfortable to write it using gedit and vim

while googling i saw this.. but this was not even of help for me
https://bugs.launchpad.net/ubuntu/+bug/214053
http://ubuntuforums.org/showthread.php?t=1375873

i tried with the things given below but still no results
https://bugs.launchpad.net/ubuntu/+bug/214053

dont know what the problem is

Last edited by vikki; 06-11-2010 at 04:48 AM.
 
Old 06-11-2010, 05:08 AM   #4
tracertong
Member
 
Registered: Jun 2010
Posts: 34

Rep: Reputation: 16
All I can suggest is that these IDEs are opening up with the permissions of another user or group. 'You' is a relative term in Unix, and when it says "You don't have permission to write in the file" it's really talking to the IDE, and not you.

Computers can be frustrating, but they don't lie (well, IBM iSeries sometimes lie, but that's another story)...
 
Old 06-11-2010, 05:27 AM   #5
vikki
Member
 
Registered: Jun 2009
Posts: 30

Original Poster
Rep: Reputation: 18
But i tried changing the permissions to 777
still it is not able to save..
 
Old 06-11-2010, 08:46 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,755

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by vikki View Post
But i tried changing the permissions to 777
still it is not able to save..
Sorry, it's a permissions issue. The web-based editors are trying to write as the web-engine user, with the limitations of that user, and the fact that you're going through the web interface. For example, if you don't EXPLICITLY tell Apache to follow symlinks, it won't...and you'll get permission denied messages, even if you're running Apache as root, with 777 permissions on that directory.

Try setting a directory alias, or define the UNC path.
Code:
Alias /test/ "//server/share/data/webroot/test/"

OR

<Directory "//server/folder/subfolder"
Be aware that 'special' characters (like $, spaces, (), etc.), are going to cause problems if they're in the directory name. Make sure the directory doesn't have those chars in it.
 
Old 06-14-2010, 12:09 AM   #7
vikki
Member
 
Registered: Jun 2009
Posts: 30

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by TB0ne View Post
Sorry, it's a permissions issue. The web-based editors are trying to write as the web-engine user, with the limitations of that user, and the fact that you're going through the web interface. For example, if you don't EXPLICITLY tell Apache to follow symlinks, it won't...and you'll get permission denied messages, even if you're running Apache as root, with 777 permissions on that directory.

Try setting a directory alias, or define the UNC path.
Code:
Alias /test/ "//server/share/data/webroot/test/"

OR

<Directory "//server/folder/subfolder"
Be aware that 'special' characters (like $, spaces, (), etc.), are going to cause problems if they're in the directory name. Make sure the directory doesn't have those chars in it.
Sorry but i am not trying to work through any web based editor.. I am using quanta editor which is same as any other editor like gedit and vim. the difference is it is a IDE and give features like dreamviewer in Windows. I guess the problem could be of lock, actually the Vim/Gedit doesnt create lock in a file where quanta plus do..

Hope this info gives better view of my problem.

Arpit tolani

Last edited by vikki; 06-14-2010 at 12:31 AM.
 
Old 06-14-2010, 10:18 AM   #8
tracertong
Member
 
Registered: Jun 2010
Posts: 34

Rep: Reputation: 16
Well, it may be something to do with the fact that these things are using a 'save' dialogue, then, rather than just piping the file down onto the disc. Something cmmon to all the desktop sessions, and all the GUIs used, which isn't talking the correct dialect of the CIFS protocol, that the Windows box needs.

Are all users using the same type of desktop? Same version? Is it Gnome, KDE, or something else?

(Gnome's GtkFileChooser, which lies at the heart of the Open/Save functionality of most Gnome desktop software, is widely reviled for many reasons, and this may just be a new reason.)

And what is the exact error, you're getting back? I presume the error is coming back from Windows itself, so does it have one of those totally-ungeeky hexadecimal error codes, that Microsoft is so fond of showing its users?

At this stage, I think anything that could be Googled, to identify which software, in the chain, was actually generating the message, would be useful.
 
Old 06-15-2010, 11:42 PM   #9
vikki
Member
 
Registered: Jun 2009
Posts: 30

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by tracertong View Post
Well, it may be something to do with the fact that these things are using a 'save' dialogue, then, rather than just piping the file down onto the disc. Something cmmon to all the desktop sessions, and all the GUIs used, which isn't talking the correct dialect of the CIFS protocol, that the Windows box needs.

Are all users using the same type of desktop? Same version? Is it Gnome, KDE, or something else?

(Gnome's GtkFileChooser, which lies at the heart of the Open/Save functionality of most Gnome desktop software, is widely reviled for many reasons, and this may just be a new reason.)

And what is the exact error, you're getting back? I presume the error is coming back from Windows itself, so does it have one of those totally-ungeeky hexadecimal error codes, that Microsoft is so fond of showing its users?

At this stage, I think anything that could be Googled, to identify which software, in the chain, was actually generating the message, would be useful.
Yes all the desktop are having same OS... Ubuntu 9.10.. they are using GNOME..
Today i checked one more thing.. i umounted the samba drive and used it connect to server option.. and it was working smoothly... i guess there is some problem with mounting only... i tried to use both smbfs as well as cifs... it says you dont have permission to save the file

Thanks for all your efforts...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
Samba against AD, cannot write to a share. mago Linux - Server 1 11-06-2008 12:12 AM
Why can I not write to a SAMBA share when read/write is enabled? eric m Linux - General 4 08-21-2006 09:22 PM
Samba - can't write to share rels Linux - Software 2 05-26-2006 12:39 PM
Can't write to Samba share erikcw Linux - Software 3 01-26-2005 03:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration