Re: write to DISC1
- I am no expert, but it's been over 6 weeks since the post was posted,
so I thought I would reply.
Using the commands chmod and chown, you can set all file permissions.
chown sets the owner and group for a file. e.g:
chown user file
or chown user:group file
This is not used very much since it is not that common to want to
change the owner or group.
chmod sets the file's permissions for it's owner, group, and everyone
chmod 123 file
The 123 should be replaced by the required code. In the example 1 is
for the owner, 2 for the group, and 3 for EE. The numer you assign to
each is worked out as follows:
4 for read access,
2 for write,
and 1 for execute.
If you want to assign read and write, these two should be added
together (6). If you want read and execute, then it would be 4+1 = 5.
So from this we work out that if we want our file, temp.txt, to be
read and written by us, read by the rest of the group, but not seen by
the rest of the world, then we use:
chmod 640 temp.txt
However, if it is a script that everyone needs to run, but you don't
want anyone else reading it, then the command would be:
chmod 711 temp.txt
If we want everyone to be able to do everything:
chmod 777 temp.txt
Both commands take the -R option (chmod -R 777 temp.txt and chown -R
me:grp temp.txt) which means that they will process all
sub-directories as well.
temp.txt can be replaced by wildcards like * or ? or *.txt
In order to change your directory/drive to give:
you read and write access,
the group "everyone" ownership,
and EE read access,
you should telnet or ssh into your slug, cd to the right directory
(from the sounds of it this will be /share/hdd/data/ or something
close) and then use:
chown -R YourUserName:everyone *
chmod -R 644 *
If you want to limit the reading to just you, you need:
chown -R YourUserName:administrators *
chmod -R 600 *
Note: Issuing 777 gives everyone full control, which is not
Let me know if this fails to make everything clear.
--- In email@example.com, "Graham" <fgmarshall@...> wrote:
> --- In firstname.lastname@example.org, Staber Hans Peter <yahoo.hp@>
> > I am a newbie to the NSLU2. I have googled a bit and tried to find
> > something regarding disc write access on the FAQ and in the vaults -
> > to no avail. I am quite embarassed about what I need to ask the group
> > with my first question :
> > I can read the data from my 300 GB disk attached to a NSLU2 but I
> > cannot write to it. And this despite my efforts to have "rw" access
> > setup for the shares. Yes - I have the slug in the same workgroup
> > than the laptop (I edited samba.conf accordingly).
> > Where do I need to pick up the rope to get to a solution to this
> > (simple) problem ?
> > My hardware : Dell Latitude D430 laptop, dualboot WinXP Pro and
> > Debian 4.0r4 in a LAN
> > --
> > Hans Peter Staber
> > Salzburg
> I am also new to Linux - but I found that setting the permissions of
> the folders on the disk to 777 let me write. Perhaps an expert can
> tell us the correct answer...