LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't change permissionss (https://www.linuxquestions.org/questions/linux-newbie-8/cant-change-permissionss-507183/)

drbenson 12-03-2006 03:53 PM

Can't change permissionss
 
I'm having a devil of a time setting up a simple file storage server. I admit, I'm a Linux newbie, and haven't used the command line in a long time.

I'm unable to change access to the three FAT32 formatted drives I have mounted in my Suse 10.1 system. When I go to the drives in Konqueror while logged in as root, I right click and select Properties, then the Permissions tab. I want 'everyone'- this server will only be connected to a firewalled VPN- to be able to view and modify files.

When I try to change the 'Others' permission to 'Can Change and Modify Files', and also check 'Apply Changes to All Subfolders and their Contents', then click OK, I get a progress screen that never gets past 0%, then disappears. When I go back to check the permissions, nothing has changed and I still can't copy files from my Windows boxes to the server.

Help would be appreciated. Thanks.

mikemrh9 12-03-2006 05:18 PM

I just had a look in Konqueror, and it does give the impression that you can set permissions as with ext3, but practically, this won't be applied to the disk as permissions are not supported under FAT32. However, from your post I assume that you are trying to change the permissions from a Windows PC, not the Linux server.

Your windows PC's should be able to use files from any mounted partition on your linux box, irrespective of the filesystem used under Linux. This is because the windows pc's will use SMB or CIFS to connect to SAMBA across the network, and your Linux server will use it's own local file system drivers to access the information on the disk, then pass the files back across the network using SMB.

I think that you need to look at your SAMBA configuration rather than your file permissions to start with.

The config file is /etc/smb.conf

I suggest that you find the section detailing your share that is giving you problems and ensure that ONE of the following is set:

read only = no

or

writeable = yes

(both do the same thing) The default is for the share to be set as read only, which would stop you from writing to the share from the client.

drbenson 12-04-2006 01:31 AM

Thanks, but I'm actually trying to change permissions from the Linux box. The Samba configuration is just as you described- read only=no, guest ok. The problem is that even in that configuration, the Windows boxes can't create files or folders on the Linux disks, nor can I copy a file into them. I can copy files from the Windows box to the Linux box from Linux, but not from Windows.

The reason I tried to change permissions at the mount level was that if I access the Samba shares in the Linux box via Konqueror, I can't create files or folders, though I can do so (as a member of the Users group) on the volumes accessed at the mount point (also via Konqueror). It's the third, unchangeable permission- Others- that seems to be the hangup.

Now if you're saying that's irrelevant in a FAT32 volume, I'm REALLY stumped. And it brings up another issue about which I seem to be misinformed. I thought that for Windows (via Samba) to write to a Linux drive, the Linux drive had to be formatted in one of the Windows formats. Is that not the case? The bulk of the files on the server will be lossless .WMA files, and if they'll stream properly recorded on a native Linux formatted disk, I'm not opposed.

If I can solve this problem by reformatting the storage drives, now would be the best time.

Tinkster 12-04-2006 01:43 AM

Quote:

Originally Posted by drbenson
Now if you're saying that's irrelevant in a FAT32 volume, I'm REALLY stumped. And it brings up another issue about which I seem to be misinformed. I thought that for Windows (via Samba) to write to a Linux drive, the Linux drive had to be formatted in one of the Windows formats. Is that not the case? The bulk of the files on the server will be lossless .WMA files, and if they'll stream properly recorded on a native Linux formatted disk, I'm not opposed.

If I can solve this problem by reformatting the storage drives, now would be the best time.

Well, it's definitely NOT true that the file-system needs to
be a windows one to be used with samba, and from a performance
and security point of view I'd highly recommend choosing a
Linux native file-system for the shares.

What user is your samba daemon running as? It may well be
that the daemon can't write to the drives. You *could* just modify
the fstab entry to have umask=000 and see whether it works then.



Cheers,
Tink

drbenson 12-04-2006 09:42 AM

OK, guess I'll reformat the storage drives to a Linux format. Any particular format, given the file server / backup nature of the Linux storage?

Not sure I understand the question about Samba 'running as'. I set up the Samba server in Yast. Is the fstab entry you're referring to the same thing I get when I 'edit' a share? If so, do I understand correctly that I enter umask=000 as a line in addition to guest ok and writeable? Thanks.

Tinkster 12-04-2006 11:09 AM

Quote:

Originally Posted by drbenson
OK, guess I'll reformat the storage drives to a Linux format. Any particular format, given the file server / backup nature of the Linux storage?

Matter of taste and personal preference; I tend to choose
reiserfs, still don't like ext2/3 :}

Quote:

Originally Posted by drbenson
Not sure I understand the question about Samba 'running as'. I set up the Samba server in Yast. Is the fstab entry you're referring to the same thing I get when I 'edit' a share? If so, do I understand correctly that I enter umask=000 as a line in addition to guest ok and writeable? Thanks.

/etc/fstab tells the box how to mount which file-system, it's
samba independent (and if you actually do re-format the
partitions with a linux fs you needn't worry about the umask).
It allows you to set a DOS filesystems partition on mount since
it has no built-in notion of linux permissions and ownerships.

As for the user: if you do a 'ps -ef | grep mbd', what do you
get? Please post it. :}


Cheers,
Tink

drbenson 12-05-2006 12:15 AM

Here's the output- means nothing to me!
root 3042 1 0 21.28 ? 00:00:00 /usr/sbin/nmbd -D -s /etc/samba/smb.conf
root 3141 1 0 21.28 ? 00:00:00 /usr/sbin/nmbd -D -s /etc/samba/smb.conf
root 3194 3141 0 21.28 ?
00:00:00 /usr/sbin/nmbd -D -s /etc/samba/smb.conf
craig 5242 5223 0 22.04 pts/3 00:00:00 grep mbd

Tinkster 12-05-2006 02:58 AM

Means that samba is running as user root.


Cheers,
Tink

Pinkks 02-17-2007 04:15 PM

I have recently been through the same process, possibly with even less experience of Linux and command line.

My understanding is that you cannot set Linux permissions on a windows formatted HDD (FAT or NTFS) and I have reformatted my disks as Ext3. Everything is working fine in terms of Samba.

However, you might find you have the same problems with cascading file permissions that led to this thread http://www.linuxquestions.org/questi...d.php?t=529101


All times are GMT -5. The time now is 08:04 AM.