General discussion

Locked

Continue the Linux discussion

By editor's response ·
Attention Linux fans:

We've created a brand new Linux discussion thread for you to post your Linux questions, enter comments about our Linux e-newsletter, and offer suggestions for future tips.

To take a look at the previous Linux discussionthread, which includes a lot of great information, follow this URL (be sure to delete any spaces when you copy and paste this link into your browser):
http://www.techrepublic.com/forumdiscuss/thread_detail.jhtml?thread_id=122888&message_id=739678

And if you haven't subscribed to our free Linux e-newsletter, be sure to do so today!
http://www.techrepublic.com/techmails.jhtml?repID=r001

This conversation is currently closed to new comments.

22 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Overwriting files

by rick In reply to Continue the Linux discus ...

I am new to Linux and have just integrated a small Linux server into my Windows network using Samba. I plan to use it (running Apache, MySQL and PHP) to test dynamic websites before uploading them.

I have created a share where I can copy HTML files to be tested. The problem I have is with editing files. If I open a file in the share for editing from a Windows box using something like Notepad, I am unable to save the file using the same name. (Permissions are wide open on the folder containing the files: chmod 777). Do I have to set permissions on each individual file? The only workaround I have been able to divise is to edit all the files in Windows in a folder, delete all the files from the Linux server each time editing is required and then recopy the folder from the Windows box back into the Linux share.

Collapse -

file permissions

by pbourke In reply to Overwriting files

It?s all about file permissions. Windows file permission do not map directly to Linux file permissions. Typically, most users install a Microsoft?s UNIX tools (or some other 3rd party tool to map Linux user accounts to windows user accounts. This will solve your issue. Another way to defeat the permission thing is with an SSH program (free or otherwise). Login to your Linux box using SSH and an authorized Linux user account, then ftp the files directly to your source directory. Here at the office, we use FSecure. FSecure has a built in SSH ftp program (and it a GUI).

Collapse -

Thanks

by rick In reply to file permissions

Thanks for your advice. I'll give it a try.

Collapse -

Samba share

by philux In reply to Overwriting files

Take a look at: http://us2.samba.org/samba/docs/man/smb.conf.5.html

When you say permissions are wide open, do you mean on the directory or the files? The truth is, directories doesn't exist.

I've setup a Gnu/Linux Samba+Apache server for my previous company.

Collapse -

Samba Share (the whole answer)

by philux In reply to Overwriting files

Hi Rick,

Check your share section, and see if your share is not read only. You need at least:

[SHARED_DIRECTORY]
path = /directory_to_share
writeable = yes

Take a look at: http://us2.samba.org/samba/docs/man/smb.conf.5.html

When you say permissions are wide open, do you mean on the directory or the files? The truth is, directories doesn't exist.

I've setup a Gnu/Linux Samba+Apache server for my previous company.

Collapse -

Permissions

by rick In reply to Samba Share (the whole an ...

I meant permissions for the directory.

Based on your advice and that of the other replies, it looks like I will have to do some more work to ensure that any files created there have the same permissions. It will be good practice. I know how to use the vi text editor and I like running stuff from the prompt in Linux. Reminds me of my old DOS days.

Thanks to everyone that has replied. I will let you know how things work out.

Collapse -

Samba configuration

by Brian M In reply to Overwriting files

There are a couple of things you need to do. First, in the smb.conf file, for the share that you are writing to, make sure you have an entry like "create mode = 770". This will force the files created to be writable by the group that owns them. I would also go to the directory that is at the top of this share, and from Linux issue a "chmod g+s directory_name". This will force all files created in this directory to belong to the group that owns the directory. Of course, this share should have a line that allows this group to write to the share ("write list = @group_name").

Look up the relevent info in the man pages for the smb.conf file ("man smb.conf").

Collapse -

smb.conf

by Brian M In reply to Overwriting files

The problem is likely in your Samba configuration. Does the Samba share have a line that says "create mode = 777". If not, the Samba program will create files that are not world writable. Also, on the parent directory, you should run "chmod g+s dirctory". This will force all files created in this directory to be owned by the group. This group should also have write access the the Samba share ("write list = @group_name" should be in the smb.conf file. Run "man smb.conf" to get more detailsabout these settings.

Collapse -

It's working

by rick In reply to smb.conf

Thanks Brian (and the other posters also),

I was able to make the necessary changes using the Samba Web Administration Tool, choosing the share and then, under security options, setting "create mask" to 0777.

I am now able to open an HTML filein the share from a Windows box using Notepad, edit it and save it.

Collapse -

RAID Emulation

by hoser81269 In reply to Continue the Linux discus ...

Can I RAID-1/mirror or RAID-5/stripe-with-parity without a RAID controller? For example, NT-Server (insert gag reflex here) provides functionality to mirror the system disc and stripe or mirror the non-system discs through the OS. Can I do the same with a typical Linux distribution? Thanks!

Back to IT Employment Forum
22 total posts (Page 1 of 3)   01 | 02 | 03   Next

Related Discussions

Related Forums