How can we do it?
Joyce.
--
"The spear in the Other's heart is in your own: you are he." -- Surak
> DH and I have just started using Ubuntu, and as we have very
> different tastes in window furniture I have set us up as two users.
I don't know who DH is. :-)
> But I have found no way for us to save webpages and documents so
> that we can both read them. If Ubuntu is to be of use, we will want
> to have our accounts, address books, etc. in shared directories.
>
> How can we do it?
>
> Joyce.
Just add both users to the same group and allow that group read and
write permission to the file(s) or director(y/ies) in question.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
> > DH and I have just started using Ubuntu, and as we have very
> > different tastes in window furniture I have set us up as two
> > users.
> I don't know who DH is. :-)
"Dear Husband", common usage on the alt.* newsgroups - the ones I
read, anyway.
> > But I have found no way for us to save webpages and documents
> > so that we can both read them. If Ubuntu is to be of use, we
> > will want to have our accounts, address books, etc. in shared
> > directories.
> Just add both users to the same group
I had got that far :-)
> and allow that group read and write permission to the file(s) or
> director(y/ies) in question.
Ah! Properties of the directory itself! I was looking for something
in the group administration window. (Knowing that a thing does
exist helps enormously in finding it.)
But when I save a file as one user, it is locked against the other,
even in the opened directory. Can I save as a group, or must I
change the permissions of each file when I save it?
> But when I save a file as one user, it is locked against the other,
> even in the opened directory. Can I save as a group, or must I
> change the permissions of each file when I save it?
What are your umask settings for file creation? Also, while you can
share the same group, it will still create the file as your default
group, so you'll need to use chgrp shredgrpname /path/to/file (with the
appropriate permissions so both can read, write and/or execute).
> But when I save a file as one user, it is locked against the other,
> even in the opened directory. Can I save as a group, or must I
> change the permissions of each file when I save it?
Set the group for the directory, and the permissions, so that files created
in that group will have the directories group. See
info coreutils 'Directory Setuid and Setgid'
Regards, Dave Hodgins
--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
> > But when I save a file as one user, it is locked against the
> > other, even in the opened directory. Can I save as a group, or
> > must I change the permissions of each file when I save it?
> What are your umask settings for file creation?
umask is set in /etc/login.defs to 022 - I think I want to change
that (for now, at least) to 000.
Since the file belongs to root, I can't edit it. I could log in
as root to edit it in the desktop, but there are warnings against
doing that. I suppose I could use the terminal to
sudo -i
vi /etc/login.defs
but while I was once proficient in edlin I've never used vi. The
chances of a mistake are high.
> Also, while you can share the same group, it will still create
> the file as your default group, so you'll need to use
> chgrp shredgrpname /path/to/file
> (with the appropriate permissions so both can read, write and/or
> execute).
I have set each of us (and root) to be members of the other group,
so I think I can postpone trying this until I have spent a few
months reading documentation (in my copious spare time).
For now, I can set directories in home/ to have read-write access
from everyone after each session, with included files. In fact, I
should be able to set each home directory that way?
Many thanks,
> Set the group for the directory, and the permissions, so that
> files created in that group will have the directories group. See
> info coreutils 'Directory Setuid and Setgid'
I looked at those, and my brain hurts :-(
We've had this machine since November, and have spent most of our
spare time learning to use WinXP (having moved from RISC OS). Until
_Ubuntu Unleashed_ arrived last week I'd done nothing in Ubuntu but
set screensaver and backdrop (and play Freecell).
I'll learn!
You just need to put both users in the same group and set their umasks to
permit group read and write access. Then you will each be able to read and
write the other's files.
--
John Hasler
jo...@dhh.gt.org
Dancing Horse Hill
Elmwood, WI USA
> You just need to put both users in the same group and set their
> umasks to permit group read and write access. Then you will each
> be able to read and write the other's files.
We are now each in each other's group, but I need simple newbie
instructions for setting umask, please.
> David W. Hodgins wrote:
>
>> Set the group for the directory, and the permissions, so that
>> files created in that group will have the directories group. See
>> info coreutils 'Directory Setuid and Setgid'
>
> I looked at those, and my brain hurts :-(
If you and DH are in group 'family"
do
mkdir shared_dir
chgrp family shared_dir
chmod g+rwxs shared_dir
(grants read, write, execute access, and makes it setgid - so that all
files created in this directory are in group family)
You also want your umask to be 002
(read/write/execute access to those in your group, and read/execute by
others)
Don't set it to 000. That makes it world writable.
> Tim Greer wrote:
>> Joyce of Pendle wrote:
>
>> > But when I save a file as one user, it is locked against the
>> > other, even in the opened directory. Can I save as a group, or
>> > must I change the permissions of each file when I save it?
>
>> What are your umask settings for file creation?
>
> umask is set in /etc/login.defs to 022 - I think I want to change
> that (for now, at least) to 000.
Just set it for group read/write/execute (whatever is appropriate). You
probably don't want to have it actually be 000 (that's a bit too open
and shouldn't be necessary).
Check your local profile/bashrc files to edit the setting.
>> Also, while you can share the same group, it will still create
>> the file as your default group, so you'll need to use
>> chgrp shredgrpname /path/to/file
>> (with the appropriate permissions so both can read, write and/or
>> execute).
>
> I have set each of us (and root) to be members of the other group,
> so I think I can postpone trying this until I have spent a few
> months reading documentation (in my copious spare time).
>
> For now, I can set directories in home/ to have read-write access
> from everyone after each session, with included files. In fact, I
> should be able to set each home directory that way?
You're setting world access to home directories? Can you trust all of
the users on the system, including any remote access (if you allow
that)?
> >> What are your umask settings for file creation?
> > umask is set in /etc/login.defs to 022 - I think I want to
> > change that (for now, at least) to 000.
> Just set it for group read/write/execute (whatever is
> appropriate). You probably don't want to have it actually be 000
> (that's a bit too open and shouldn't be necessary).
> Check your local profile/bashrc files to edit the setting.
How?
> >
> > I have set each of us (and root) to be members of the other
> > group, so I think I can postpone trying this until I have spent
> > a few months reading documentation (in my copious spare time).
> >
> > For now, I can set directories in home/ to have read-write
> > access from everyone after each session, with included files.
> > In fact, I should be able to set each home directory that way?
> You're setting world access to home directories? Can you trust
> all of the users on the system, including any remote access (if
> you allow that)?
Only my husband and myself will use the machine. We certainly won't
enable remote access, and will take steps to prevent it once we
actually have sensitive information on it. ATM the router is the
firewall.
I've set the mask to 002 and files each user creates are still
read-only to to their group. Hair-tearing time :((
We can set the permissions in /home/ (by logging in twice if
necessary) so I am ok for now.
> Tim Greer and Joyce of Pendle wrote:
>
>> >> What are your umask settings for file creation?
>
>> > umask is set in /etc/login.defs to 022 - I think I want to
>> > change that (for now, at least) to 000.
>
>> Just set it for group read/write/execute (whatever is
>> appropriate). You probably don't want to have it actually be 000
>> (that's a bit too open and shouldn't be necessary).
>
>> Check your local profile/bashrc files to edit the setting.
>
> How?
Put:
umask 002
In the account's ~/.bash_profile (per account)
Or modify the /etc/bashrc umask settings.
Files will be created with read and write for user and group.
Directories will be created with read, write and execute for user and
group.
Either log out and back in, or if it's per user, type source
~/.bash_profile and see the difference in permissions when the files
are created.
To set the group on the file or directory, type newgrp groupname
That allows you to control what files/directories share the same group
with the default umask settings (though you can always change those
after the fact with chmod).
>
> Only my husband and myself will use the machine. We certainly won't
> enable remote access, and will take steps to prevent it once we
> actually have sensitive information on it. ATM the router is the
> firewall.
>
Have you considered just sharing the same account? Anyway, I suppose it
would be safe enough to allow world read and write, but just like
sharing the group, be more careful than what you'd consider normally
careful when modifying, overwriting, deleting files, etc..
Did you log out and back in or resource the file where you have the
umask settings changed?
I used this sequence on /etc/ to edit login.defs
Now how do I set /etc/ back to belonging only to the root?
> Maxwell Lol wrote:
>> If you and DH are in group 'family"
>> do
>> mkdir shared_dir
>> chgrp family shared_dir
>> chmod g+rwxs shared_dir
>
> I used this sequence on /etc/ to edit login.defs
>
> Now how do I set /etc/ back to belonging only to the root?
>
> Joyce.
>
If you were root to be able to change /etc, why didn't you edit the file
as root, instead of giving /etc/ group write permission to the dir or
files? Simply set it back to root ownership:
chown root:root /etc
chmod 755 /etc
Or, on the file itself (if you meant login.defs):
chown root:root /etc/login.defs
chmod 644 /etc/login.defs
> Only my husband and myself will use the machine. We certainly won't
> enable remote access, and will take steps to prevent it once we
> actually have sensitive information on it.
You still don't need to enable work write. Group write is just fine:
sudo groupadd joyhus
sudo gpasswd -a joyce joyhus
sudo gpasswd -a husband joyhus
sudo mkdir /var/pendl
sudo chgrp joyhus /var/pendl
sudo chmod g+w /var/pendl
When you both next login, you will both be able to write to
the /var/pendl directory.
> ATM the router is the firewall.
That is good.
Mark.
--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/
> > Only my husband and myself will use the machine. We certainly
> > won't enable remote access, and will take steps to prevent it
> > once we actually have sensitive information on it. ATM the
> > router is the firewall.
> Have you considered just sharing the same account?
That's where we started. But I like a nice backdrop (changed daily)
with no desktop icons, he likes what his backdrop invisible behind
links to files. We each work best in our own choice of environment.
However, I do wonder if it would have been easier to write a script
to change desktop, screensaver, et al.
I thought I wanted to use the KDE desktop, but I find it
counter-intuitive and slow (my son uses it but does his work from
the command line; I think he has to!) The busy icon is great, and a
lot of software came with the install, so I'm happy. The KDE user
will be deleted in due course.
> Anyway, I suppose it would be safe enough to allow world read and
> write, but just like sharing the group, be more careful than what
> you'd consider normally careful when modifying, overwriting,
> deleting files, etc..
Well, obviously, I won't modify his files and he won't modify mine
(if the name of the folder is the name of a person, it is private -
regardless of permissions). We didn't have unshared folders until
we started using WinXP in November, and all my "My Junk" folders
there are empty.
Joyce.
> > Only my husband and myself will use the machine.
> You still don't need to enable work write. Group write is just
> fine:
> sudo groupadd joyhus
> sudo gpasswd -a joyce joyhus
> sudo gpasswd -a husband joyhus
> sudo mkdir /var/pendl
> sudo chgrp joyhus /var/pendl
> sudo chmod g+w /var/pendl
> When you both next login, you will both be able to write to
> the /var/pendl directory.
Hey, that looks good! /var/ is in the same directory as /etc/ isn't
it? I did wonder, when _UU_ talks about all the accounts group
being able to access accounts files but not marketing, how it was
managed.
Will we both be able to read, write, overwrite files is say
var/pendle/him and var/pendle/her so that we can write messages to
each other? (Symbolic links, perhaps.)
> > Maxwell Lol wrote:
> >> If you and DH are in group 'family"
> >> do
> >> mkdir shared_dir
> >> chgrp family shared_dir
> >> chmod g+rwxs shared_dir
> >
> > I used this sequence on /etc/ to edit login.defs
> >
> > Now how do I set /etc/ back to belonging only to the root?
> >
> > Joyce.
> >
> If you were root to be able to change /etc, why didn't you edit
> the file as root, instead of giving /etc/ group write permission
> to the dir or files?
Because it was midnight, because I don't really understand
permissions, because vi might just as well be read-only for me and
I wasn't root once I went from the terminal into the desktop to use
gedit.
> Simply set it back to root ownership:
> chown root:root /etc
> chmod 755 /etc
> Or, on the file itself (if you meant login.defs):
> chown root:root /etc/login.defs
> chmod 644 /etc/login.defs
I'll try this when I've slept. Since it is 4am (I'm on Greenwich
Mean Time) I suspect that means Thursday or Friday.
I do appreciate your efforts, even though I don't understand half
of what you say. I did find out how to show hidden files. :-)
Joyce.
> I've set the mask to 002 and files each user creates are still
> read-only to to their group. Hair-tearing time :((
Check the directory where the files are created.
Does it have the same group as the one you and your husband belong to?
Does it have the g+s permission?
WHen you do a "ls -ld" does it say
drwxrwsr-x 2 joyce family 4096 2009-03-03 12:59 shared_directory
^ ^
| +----must be the group you and your husband belong to
+---must be s
Don't change all directory permissions. Just the ones you need to use.
Your computer may already have a group that is suitable, like "users"
> Maxwell Lol wrote:
>> If you and DH are in group 'family"
>> do
>> mkdir shared_dir
>> chgrp family shared_dir
>> chmod g+rwxs shared_dir
>
> I used this sequence on /etc/ to edit login.defs
Ah. You were too agressive. This is an administration function, and
you want to change tthose files as root, but you should not be root for normal
actions. So you should have become the superuser, change the
login.defs, and then revert back to the normal user, which does NOT
have permission to make the change.
Assuming you have root access, add you both to the same group
("testgroup" in this case), and make a directory with these permissions:
dr-xrwxr-x 2 root testgroup 4.0K 2009-03-04 13:16 shared/
The owner, and user and world permissions are up to you, and the size
depends on how many items are in it.
--
-eben QebWe...@vTerYizUonI.nOetP http://royalty.mine.nu:81
ARIES: The look on your face will be priceless when you find that 40lb
watermelon in your colon. Trade toothbrushes with an albino dwarf, then
give a hickey to Meryl Streep. -- Weird Al, _Your Horoscope for Today_
> In article <r0lrl.101288$xK6....@newsfe12.iad>,
> Tim Greer <t...@burlyhost.com> wrote:
[snip]
>> If you were root to be able to change /etc, why didn't you edit the file
>> as root, instead of giving /etc/ group write permission to the dir or
>> files?
> Because it was midnight, because I don't really understand permissions,
I'm fairly sure that you should understand (from *access) read, write, lock,
at least for "the user" (and, if you've used ShareFS, for everybody else).
Lock's not present, group permissions exist, and directories and executables
need execute permission for whoever's to use them.
> because vi might just as well be read-only for me and I wasn't root once I
> went from the terminal into the desktop to use gedit.
Then use joe or nano. Or, perhaps, emacs, but I think that you'll prefer one
of the others.
(Or set up an NFS export and Sunfish, and use a certain other three-letter
editor.)
>> Simply set it back to root ownership:
>> chown root:root /etc
>> chmod 755 /etc
Looking at that 755 symbolically, as chmod understands it, and also l-to-r:
u=rwx,g=rx,o=rx
or (more compactly)
u=rwx,go=rx
>> Or, on the file itself (if you meant login.defs):
>> chown root:root /etc/login.defs
>> chmod 644 /etc/login.defs
If you want to look at it as a bitmap: for each component, r=4, w=2, x=1.
(That 644 should be fairly easy to work out, given that.)
[snip]
> I do appreciate your efforts, even though I don't understand half of what
> you say. I did find out how to show hidden files. :-)
I won't complicate things by mentioning ACLs. ;-)
--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Burn less waste. Use less packaging. Waste less. USE FEWER RESOURCES.
Four sail: won spare ling chequer.
> Joyce of Pendle <pen...@invalid.invalid> wrote:
>> Only my husband and myself will use the machine. We certainly won't
>> enable remote access, and will take steps to prevent it once we actually
>> have sensitive information on it.
> You still don't need to enable work write. Group write is just fine:
> sudo groupadd joyhus
> sudo gpasswd -a joyce joyhus
> sudo gpasswd -a husband joyhus
> sudo mkdir /var/pendl
> sudo chgrp joyhus /var/pendl
> sudo chmod g+w /var/pendl
Something about this thread is making me think s/joyhus/derek/...
--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Lobby friends, family, business, government. WE'RE KILLING THE PLANET.
It's far easier to suggest solutions when you know nothing about the problem.
> Something about this thread is making me think s/joyhus/derek/...
You must be joking!
Oops! I've been using my alt.* sig-file:(
So in this segment:
> sudo groupadd joyhus
> sudo gpasswd -a joyce joyhus
> sudo gpasswd -a husband joyhus
> sudo mkdir /var/pendl
> sudo chgrp joyhus /var/pendl
> sudo chmod g+w /var/pendl
should those passwords be our login passwords, or a new one
for the group?
> > Because it was midnight, because I don't really understand
> > permissions,
> I'm fairly sure that you should understand (from *access) read,
> write, lock, at least for "the user" [...]
Oh, I understand *about* permissions (and about writing C programs)
but I don't have the syntax (like changing from Atom to BBC B). Also,
I remember perfectly well having a command line and no gui (our first
A3000 was bought in 1981), but I *prefer* using the desktop.
Joyce.
--
Joyce Haslam pendle atte boulsworth dotcodotuk
Powerbase Support http://www.boulsworth.co.uk/
running Select 4.37 with 64M RAM plus 2M VRAM on SA RPC
learning Ubuntu, VRPC-A & Windows XP on a RISCube tower
> So in this segment:
> > sudo groupadd joyhus
> > sudo gpasswd -a joyce joyhus
> > sudo gpasswd -a husband joyhus
> > sudo mkdir /var/pendl
> > sudo chgrp joyhus /var/pendl
> > sudo chmod g+w /var/pendle
The code is by Mark Hobley; thank you, I intend to use it.
--
Joyce.
--
WinXP running VirtualAcorn RPC on amd64 mini-tower
- Acorn user since 1973
with Ubuntu 8.10 on 2nd disc - total newbie in Linux
> Darren Salt wrote:
>
>> Something about this thread is making me think s/joyhus/derek/...
>
> You must be joking!
>
> Oops! I've been using my alt.* sig-file:(
>
> So in this segment:
>> sudo groupadd joyhus
>> sudo gpasswd -a joyce joyhus
>> sudo gpasswd -a husband joyhus
>> sudo mkdir /var/pendl
>> sudo chgrp joyhus /var/pendl
>> sudo chmod g+w /var/pendl
> should those passwords be our login passwords, or a new one
> for the group?
man gpasswd
> Darren Salt wrote:
>> Something about this thread is making me think s/joyhus/derek/...
(Hmm, close. Got the first part wrong.)
> You must be joking!
> Oops! I've been using my alt.* sig-file:(
You have too many spaces after the "--" ;-)
> So in this segment:
>> sudo groupadd joyhus
>> sudo gpasswd -a joyce joyhus
>> sudo gpasswd -a husband joyhus
>> sudo mkdir /var/pendl
>> sudo chgrp joyhus /var/pendl
>> sudo chmod g+w /var/pendl
> should those passwords be our login passwords, or a new one for the group?
Using gpasswd there is a bit misleading. Noting the Debian derivative
reference in your .sig:
sudo adduser $USER $GROUP
>>> Because it was midnight, because I don't really understand
>>> permissions,
>> I'm fairly sure that you should understand (from *access) read,
>> write, lock, at least for "the user" [...]
> Oh, I understand *about* permissions (and about writing C programs) but I
> don't have the syntax (like changing from Atom to BBC B).
$ man chmod
$ man chown
$ man chgrp
Using symbolic permissions with chmod is easier – particularly 'X', if you're
doing things like recursively removing execute permissions – but recognising
the 3-digit forms is still *very* useful. (The fourth digit isn't often seen,
IME.)
> Also, I remember perfectly well having a command line and no gui
You might encounter that on occasion should X crash. (Which is very
unlikely.)
> (our first A3000 was bought in 1981),
That sounds... at least 8 years too early...
> but I *prefer* using the desktop.
I always have some terminal windows open; some things are just faster that
way.
--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| Let's keep the pound sterling
flattery: n. Telling a person exactly what he thinks of himself.
<looks up from pile of reference books, waves>
Hey wow, the terminal will launch gedit in a window! I've never
seen anything like that before :-)
--
Joyce.
--
WinXP running VirtualAcorn RPC on amd64 mini-tower
- Acorn user since 1978
> Tim Greer wrote:
>> man gpasswd
>
> <looks up from pile of reference books, waves>
>
> Hey wow, the terminal will launch gedit in a window! I've never
> seen anything like that before :-)
>
If you don't like that happening (I wouldn't), you can disable that. If
you do like it, then cool. :-)
> You still don't need to enable work write.
world write?
> Group write is just fine:
> sudo groupadd joyhus
[...]
> When you both next login, you will both be able to write to the
> /var/pendl directory.
Is there a way to add /var/pendl to the Places list of the gnome
desktop? Or otherwise open the directory as if it were in
/home/user ?
Joyce.
--
Joyce Haslam pendle atte boulsworth dotcodotuk
WinXP running VirtualAcorn RPC on amd64 tower
> Hey, that looks good! /var/ is in the same directory as /etc/ isn't
> it?
/var and /etc are separate directories both in the root directory (/ at
the top of the tree).
> Will we both be able to read, write, overwrite files is say
> var/pendle/him and var/pendle/her so that we can write messages to
> each other? (Symbolic links, perhaps.)
You can both create files in /var/pendl no problem. You can also
overwrite or delete each others files in that directory.
So if you leave a message for your husband to mow the lawn. He can delete it
when he has finished :)
Got me. If that works like the list of directories in xfce's open/save
dialogs, you right-click on pendl from a listing of /var, "Send to" ->
left hand pane or whatever it's called. If that doesn't work, probably
googling on |gnome places add| will turn up something useful.
> Or otherwise open the directory as if it were in /home/user ?
cd /home ; sudo ln -s /var/pendl shared
Better to do that _first_ then add /home/shared (instead of /var/pendl) to
the "Places" list. Then you can move the contents of /var/pendl around to
your heart's content, but as long as you remake the link with the same
name it'll work the same way. Heck, I'd make the link in ~ instead of
~/.. . Fewer keystrokes.
--
-eben QebWe...@vTerYizUonI.nOetP http://royalty.mine.nu:81
CAPRICORN: The stars say you're an exciting and wonderful person... but
you know they're lying. If I were you, I'd lock my doors and windows
and never never never never never leave my house again. -- Weird Al
Yes that should say "world write". Sorry Joyce. My fingers type without
my brain being engaged :)
> Is there a way to add /var/pendl to the Places list of the gnome
> desktop?
This is not difficult. I think you just need to create a symlink in the
place where gnome stores its desktop files.
I haven't got this information to hand, because I do not use Gnome here,
but it will only take a few seconds to do that. Someone who knows Gnome
would be able to tell you how to do this straight away. I'll try and get
some notes written up.
> > Is there a way to add /var/pendl to the Places list of the
> > gnome desktop?
> Got me. If that works like the list of directories in xfce's
> open/save dialogs, you right-click on pendl from a listing of
> /var, "Send to" -> left hand pane or whatever it's called. If
> that doesn't work, probably googling on |gnome places add| will
> turn up something useful.
I'll try googling - maybe I'll really need it.
> > Or otherwise open the directory as if it were in /home/user ?
> cd /home ; sudo ln -s /var/pendl shared
That did it :))
I had omitted the -s option (information filters in slowly) :(
Many thanks!
Yeah. Hard links won't work across filesystem boundaries, and only root
can make hard links to dirs. Of course, only root can usually write to
/home anyhow...
--
-eben QebWe...@vTerYizUonI.nOetP royalty.mine.nu:81
Hi! I'm a .sig virus! Copy me to your .sig!
> > > Is there a way to add /var/pendl to the Places list of the
> > > gnome desktop?
> > Got me. If that works like the list of directories in xfce's
> > open/save dialogs, you right-click on pendl from a listing of
> > /var, "Send to" -> left hand pane or whatever it's called. If
> > that doesn't work, probably googling on |gnome places add| will
> > turn up something useful.
> I'll try googling - maybe I'll really need it.
Oh my! Answer was obvious, and I did need it. I hadn't turned on
the side panel for the other user. It makes a big difference.
Thanks to all :))