Re: File Permissions - Ubuntu Server

2008-08-12 Thread Daniel Mons
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Simon Ives wrote:
| Thank you for the considered reply Daniel.  I'm currently in the process
| of reinstalling Windows XP on the few workstations at home that still
| use it (after a few too many bad experienced with Vista) and I'll
| definitely set up the new user accounts to match on the new Windows
| installs and the file server.
|
| Simon Ives.

No problems Simon.

I'd also suggest having a read through the first few chapters of this book:

http://www.samba.org/samba/docs/man/Samba-Guide/

It's available both in paper for purchase (all proceeds go back to the
Samba dev team) or online.  I have it in book format, and find it one of
the most useful resource books around.

Instead of waffling on about theoretical setups, it gives practical
examples starting off from a small home-office with a few people, right
up to a multi-site, fully authenticated enterprise.  It covers all
aspects of a Samba setup from the technological requirements through to
the political pitfalls.

Included within are actual real-world smb.conf files (not just snippets
or hard-to-read man files).

I just can't recommend the book highly enough.  If all technical books
were written like this, people like me would be out of the job. :)

- -Dan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIon12eFJDv0P9Qb8RAqwpAKCq8cg+e6FXAZKyC1kbZGzqa5CbmgCgkerF
R9jPXBX9e0/87ir0E2UFzok=
=KoEM
-END PGP SIGNATURE-

-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Re: File Permissions - Ubuntu Server

2008-08-12 Thread Simon Ives
Thank you for the considered reply Daniel.  I'm currently in the process
of reinstalling Windows XP on the few workstations at home that still
use it (after a few too many bad experienced with Vista) and I'll
definitely set up the new user accounts to match on the new Windows
installs and the file server.

Simon Ives.

> Message: 2
> Date: Tue, 12 Aug 2008 09:51:29 +1000
> From: Daniel Mons <[EMAIL PROTECTED]>
> Subject: Re: File Permissions - Ubuntu Server
> To: ubuntu-au@lists.ubuntu.com
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii; format=flowed
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Simon Ives wrote:
> | I'm running Ubuntu Server 8.04 and I need to change the permissions for
> | a large quantity of files and directories.
> |
> | I've got a directory named 'music' that I share with the home network.
> | This includes other Linux boxes that access this directory via nfs and
> | some Windows XP boxes accessing it via samba.  I've just transferred
> | around 80gb of music files and directories from a Windows drive and I
> | need a command to alter the permissions of all the files as read/write
> | for everyone.
> 
> The best way is to properly integrate your authentication systems, or at
> the very least ensure that user accounts that exist on the Windows
> machines also exist on the Linux machines and within Samba with the same
> passwords. i.e.: your windows username/password is also added to Linux
> via the "useradd" and "passwd" commands, and to Samba via the "smbpasswd
> - -a" command.
> 
> Failing that, go to the directory in question, and type:
> 
> chmod -R a+rwX /directoryname
> 
> I should note that this is highly frowned upon by Linux sysadmins (which
> I am one). Opening up world access to your file system is a poor
> substitute for properly configuring your services and authentication.
> 
> What the above command does is recursively add read and write
> permissions for all (User, Group and Other).  Additionally, the upper
> case X adds "execute" permissions to directories ONLY.  In order to
> actually enter/use a directory, execute permissions must be enabled on it.
> 
> Whatever you do, DO NOT run "chmod -R 777 /dirname".  This will also
> clobber standard files with the execute permission, making any plain
> file executable.  This has potentially dire consequences should someone
> try to run one of them.
> 
> |
> | Further, is there a way that I can set all newly created directories and
> | files within this particular directory to inherit the file permissions
> | of the parent directory?
> 
> In your smb.conf on a per-share basis, set the "create mask" and
> "directory mask" options as needed.  In your case, "create mask = 0666"
> and "directory mask = 0777" will ensure all files and directories are
> created with the correct permissions (again, I would hope you
> investigate matching up your user accounts instead, and set these to
> 0640 and 0750 respectively).
> 
> "man smb.conf" for more help on your Samba configuration, and more
> detailed explanations on all of the above.
> 
> - -Dan
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.6 (GNU/Linux)
> 
> iD8DBQFIoNCBeFJDv0P9Qb8RAlI8AJ9t7Kpx6gc37xLZ9AhIoz4TVPdjVACeNH84
> Cm1pGjj/3jNmKr9U7TTqdGY=
> =6Xt2
> -END PGP SIGNATURE-

-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Re: File Permissions - Ubuntu Server

2008-08-11 Thread Daniel Mons
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Simon Ives wrote:
| I'm running Ubuntu Server 8.04 and I need to change the permissions for
| a large quantity of files and directories.
|
| I've got a directory named 'music' that I share with the home network.
| This includes other Linux boxes that access this directory via nfs and
| some Windows XP boxes accessing it via samba.  I've just transferred
| around 80gb of music files and directories from a Windows drive and I
| need a command to alter the permissions of all the files as read/write
| for everyone.

The best way is to properly integrate your authentication systems, or at
the very least ensure that user accounts that exist on the Windows
machines also exist on the Linux machines and within Samba with the same
passwords. i.e.: your windows username/password is also added to Linux
via the "useradd" and "passwd" commands, and to Samba via the "smbpasswd
- -a" command.

Failing that, go to the directory in question, and type:

chmod -R a+rwX /directoryname

I should note that this is highly frowned upon by Linux sysadmins (which
I am one). Opening up world access to your file system is a poor
substitute for properly configuring your services and authentication.

What the above command does is recursively add read and write
permissions for all (User, Group and Other).  Additionally, the upper
case X adds "execute" permissions to directories ONLY.  In order to
actually enter/use a directory, execute permissions must be enabled on it.

Whatever you do, DO NOT run "chmod -R 777 /dirname".  This will also
clobber standard files with the execute permission, making any plain
file executable.  This has potentially dire consequences should someone
try to run one of them.

|
| Further, is there a way that I can set all newly created directories and
| files within this particular directory to inherit the file permissions
| of the parent directory?

In your smb.conf on a per-share basis, set the "create mask" and
"directory mask" options as needed.  In your case, "create mask = 0666"
and "directory mask = 0777" will ensure all files and directories are
created with the correct permissions (again, I would hope you
investigate matching up your user accounts instead, and set these to
0640 and 0750 respectively).

"man smb.conf" for more help on your Samba configuration, and more
detailed explanations on all of the above.

- -Dan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIoNCBeFJDv0P9Qb8RAlI8AJ9t7Kpx6gc37xLZ9AhIoz4TVPdjVACeNH84
Cm1pGjj/3jNmKr9U7TTqdGY=
=6Xt2
-END PGP SIGNATURE-

-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Re: File Permissions - Ubuntu Server

2008-08-11 Thread Simon Ives
On Mon, 2008-08-11 at 15:16 +0930, Karl Goetz wrote:
> On Mon, 2008-08-11 at 15:39 +1000, Simon Ives wrote:
> > I'm running Ubuntu Server 8.04 and I need to change the permissions
> for
> > a large quantity of files and directories.
> > 
> > I've got a directory named 'music' that I share with the home network.
> > This includes other Linux boxes that access this directory via nfs and
> > some Windows XP boxes accessing it via samba.  I've just transferred
> > around 80gb of music files and directories from a Windows drive and I
> > need a command to alter the permissions of all the files as read/write
> > for everyone.
> 
> chmod -R

chmod -R does the job, thanks.

On Mon, 2008-08-11 at 16:19 +1000, ... wrote:
> The simplest way is to load up a terminal window and type (where
> 'music_directory' is replaced with the path where the music is.
> # cd music_directory
> # sudo chmod -R a+rw

This doesn't quite work as chmod needs a target.  From the parent
directory of the music directory the following needed to be typed:
sudo chmod -R a+rw music

Thanks for the assistance.

Simon Ives.

-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Re: File Permissions - Ubuntu Server

2008-08-10 Thread Karl Goetz
On Mon, 2008-08-11 at 15:39 +1000, Simon Ives wrote:
> I'm running Ubuntu Server 8.04 and I need to change the permissions for
> a large quantity of files and directories.
> 
> I've got a directory named 'music' that I share with the home network.
> This includes other Linux boxes that access this directory via nfs and
> some Windows XP boxes accessing it via samba.  I've just transferred
> around 80gb of music files and directories from a Windows drive and I
> need a command to alter the permissions of all the files as read/write
> for everyone.

chmod -R

> 
> Further, is there a way that I can set all newly created directories and
> files within this particular directory to inherit the file permissions
> of the parent directory?

you can change the system umask, or perhaps s[u,g]id bits if your after
users/groups.
kk

> 
> Thanks.
> 
> Simon Ives.
> 
> 
-- 
Karl Goetz <[EMAIL PROTECTED]>


signature.asc
Description: This is a digitally signed message part
-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


File Permissions - Ubuntu Server

2008-08-10 Thread Simon Ives
I'm running Ubuntu Server 8.04 and I need to change the permissions for
a large quantity of files and directories.

I've got a directory named 'music' that I share with the home network.
This includes other Linux boxes that access this directory via nfs and
some Windows XP boxes accessing it via samba.  I've just transferred
around 80gb of music files and directories from a Windows drive and I
need a command to alter the permissions of all the files as read/write
for everyone.

Further, is there a way that I can set all newly created directories and
files within this particular directory to inherit the file permissions
of the parent directory?

Thanks.

Simon Ives.


-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au