LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-14-2007, 08:21 AM   #1
pirhana
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: CentOS
Posts: 20

Rep: Reputation: 0
Samba shares - readonly files


I've recently installed CentOS and set up a local intranet server. This is the first time I have ever used Linux and I'm really impressed and slowly becoming a convert.

I have set up a few different virtual hosts and also a samba share so I can edit my websites locally before uploading the complete changes. This is working wonderfully, except for my .htaccess files. My problem is they are read only when accessed via the shared folder. Every other file has write access.
I am sharing as user "web" and I have CHOWNed all the files to web:web and also CHMODed the .htaccess files to 0644.
The only way I seem to be able to edit the .htaccess files is to connect via SSH and edit them as root.

I am very new to Linux except for a few shared hosting accounts, so I may have missed something obvious. Sorry if I have!
 
Old 11-15-2007, 01:30 AM   #2
leosgb
Member
 
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363

Rep: Reputation: 31
Can you go to your folder using SSH and then:

Code:
ls -l
 
Old 11-15-2007, 03:01 AM   #3
pirhana
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
Yes, I did that and it lists all the files in my folder, except for the .htaccess file. If I do "ls -la" then I see the .htaccess file also.

Does this tell you what's wrong?
 
Old 11-15-2007, 03:19 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No - the "a" is for all - a .something is hidden.

Since the file is writeable by user web only, only web and root can edit and write to it. Which user were you trying to edit as, or are you connecting to Samba as (note, if you connect to Samba share as user bob, bob doesn't have write access to .htaccess)?

Last edited by billymayday; 11-15-2007 at 03:21 AM.
 
Old 11-15-2007, 04:50 AM   #5
pirhana
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday View Post
Which user were you trying to edit as, or are you connecting to Samba as?
That's why I don't understand, I'm connecting to Samba as user "web" and the files are owned by web. All files except for .htaccess are accessible.
 
Old 11-15-2007, 04:59 AM   #6
pirhana
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
I've discovered it is not the samba share but my editor.

I use PSPad http://www.pspad.com/en/ and it notices the hidden attribute and makes the file read-only by default. I realised this after opening the file in Windows Notepad and I was able to save the changes.

Thanks for your help guys.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
samba shares show 0 files in every folder??? alabamaman Linux - Software 10 08-29-2007 01:50 PM
samba deletes readonly files xrado Linux - General 2 04-21-2007 12:33 PM
Opening Files through shares on Samba hollovoid7 SUSE / openSUSE 2 11-21-2004 01:39 PM
Transferring files from Samba shares raypen Linux - Software 1 12-08-2002 06:11 PM
Why can't I see the files in the directories on my Samba-Shares? Asuka Tabi Linux - Software 1 06-21-2001 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:30 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration