Jump to content

file sharing over home network


ChrisM
 Share

Recommended Posts

# mkdir /imported

# mount 192.168.0.4:/sharedfiles /imported

mount: 192.168.0.4:/sharedfiles failed, reason given by server: Permission denied

- Its the portmap service running on that pc (client pc) as well as on the server?

- Maybe you made some changes to nfs configuration and you need to restart de service (Im just guessing here)?, do 'service nfs restart' as root on server to make sure it takes the latest changes.

 

Oh, i just seen this:

Services: on server, portmap,nfs and nfslock are shown as running in MCC on server and client.

Services needed (this is as it is on my network, which uses nfs and works):

* On server: 'nfs', 'portmap'

* On client: 'portmap'

Services like 'nfslock' or 'netfs' are NOT essential, same as 'nfs' for the clients that is NOT needed to have running, I would advice you to shut them down.

Link to comment
Share on other sites

  • Replies 33
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I've amended the services as you suggest but still, I am unable to gain access from a client computer.

 

I don't understand why I have been denied access because of permissions. Doing the test from a client - it appearsn to recognise that there is a directory, but will not/cannot view it.

 

I have also, on the server created: /sharedfiles and imported a document but i still am unable to view anything from a client.

 

Maybe I screwed up somewhere?

Link to comment
Share on other sites

Here's the report as requested.

 

/home/username/share *(ro,all_squash,sync)

"/home/username/shared stuff 192.168.0.1" (rw)

 

Cheers. Much appreciated.

 

Ok.

 

Why two different folders (/home/username/share & /home/username/shared)?? Do they really exist on the server?? Please post the output of this command: 'ls /home/username'.

 

Please post the exact command youre giving on the client computer to mount the shared folder (i.e. mount 192.168.x.x:/home/username ....etc).

Edited by feralertx
Link to comment
Share on other sites

I have no idea why two folders are showing (share/shared stuff) the latter is the correct one. On message 8

here

I posted the original script followed by what what i had edited.

 

The output from ls /home/username is:

Desktop/ Documents/ shared stuff/ tmp/

 

 

The client command/s I'm using [su] are

 

# mount 192.168.0.4:/shared stuff/mnt/shared stuff

 

but this gives me the following output

 

Usage: mount -V : print version

mount -h : print this help

mount : list mounted filesystems

mount -l : idem, including volume labels

So far the informational part. Next the mounting.

The command is `mount [-t fstype] something somewhere'.

Details found in /etc/fstab may be omitted.

mount -a [-t|-O] ... : mount all stuff from /etc/fstab

mount device : mount device at the known place

mount directory : mount known device here

mount -t type dev dir : ordinary mount command

Note that one does not really mount a device, one mounts

a filesystem (of the given type) found on the device.

One can also mount an already visible directory tree elsewhere:

mount --bind olddir newdir

or move a subtree:

mount --move olddir newdir

A device can be given by name, say /dev/hda1 or /dev/cdrom,

or by label, using -L label or by uuid, using -U uuid .

Other options: [-nfFrsvw] [-o options] [-p num].

For many more details, say man 8 mount .

 

If I use an underscore (shared_stuff) I get this

 

# mount 192.168.0.4:/shared_stuff/mnt/shared_stuff

mount: can't find 192.168.0.4:/shared_stuff/mnt/shared_stuff in /etc/fstab or /etc/mtab

 

If I run this command 'showmount -e 192.168.0.4' then this is the output

 

# showmount -e 192.168.0.4

Export list for 192.168.0.4:

/home/username/share *

/home/username/shared stuff 192.168.0.1 (everyone)

 

so it recognises it - good.

 

I've been reading that if i then follow this with the following commnads I can mount the exported filesystem:

 

mkdir /imported

mount <server name>: /<diectory name> /imported

 

this is the output

 

# mount 192.168.0.4:/shared_stuff /imported

mount: 192.168.0.4:/shared_stuff failed, reason given by server: Permission denied

 

think I may need to start from scratch?

 

Cheers.

Link to comment
Share on other sites

I have no idea why two folders are showing (share/shared stuff) the latter is the correct one

 

Oh man, dont mess whith spaces in directory/file names, linux doesnt like it, thats something that comes from the windows world :twisted: , and remember that linux is case sensitive too.

 

My advise: CHANGE EVERYTHING FROM 'shared stuff' TO 'shared_stuff' or even 'shared.stuff'.

 

- To change the directory name do (put the " " too):

 

mv "/home/username/shared stuff" /home/username/shared_stuff

 

- Change it in /etc/exports on the server

 

- Change the command you use in the client to:

 

mount 192.168.0.4:/shared stuff/mnt/shared_stuff

(or mount 192.168.0.4:/shared stuff/mnt/shared.stuff, or whatever else name you have chosen for the directory)

 

think I may need to start from scratch?

NOOOOOO, the problem is there for sure, you are just confusing nfs because of the empty space in the folder name, dont do it again :P

Edited by feralertx
Link to comment
Share on other sites

The client command/s I'm using [su] are

 

# mount 192.168.0.4:/shared stuff/mnt/shared stuff

 

I just realized that is something else wrong. The 'mount' command is:

mount server.ip.address:/shared.directory /path/in.client/where/to.mount.it

So your command:

mount 192.168.0.4:/shared stuff/mnt/shared stuff

It is NOT about right, it should be: (see the space between the two folders)

mount 192.168.0.4:/shared stuff /mnt/shared stuff

 

I suppose that the latter '/mnt/shared stuff' is the local file on the client where you want to mount the remote directory, if so, please DO CHANGE IT to 'shared_stuff' as well.

 

So after renaming both the server and client 'shared stuff' to 'shared_stuff', the command would be:

mount 192.168.0.4:/shared_stuff /mnt/shared_stuff

 

P.S.: Im going to bed now, see u in 7 hours !! :zzz::zzz:

Link to comment
Share on other sites

:o :o

 

it's really been a lonnng day - I had to escape at 10.00 4 an hour a :beer: I know I'll be dreaming of this!

 

Need to be at work 2morrow (day off 2day) but :thanks: for all the support.

 

Guess I'll be checking in 2morow.

 

G'dnight all.

Edited by ChrisM
Link to comment
Share on other sites

Hi feralertx

 

after 12 hours on this yesterday I needed a break. Back at work today, so will be back on the case this evening!

 

This is what I'll be looking at doing - renaming 'shared stuff' directory to shared_stuff (or whatever - without any spaces - thanks for letting me know about that).

 

Be aware - space required in the mount command.

 

One question. When openig etc/exports, it has two lines with two different directories (share asnd shared stuff) - as I'll be renaming line 2 (to shared_stuff) should I delete line 1 here's the original output and edit line as the ls output shows, there isn't a directory called share, so I don't know why this is even listed.

 

Big thanks also to Gowator for all the help. Hopefully all will be put right tonight.

Link to comment
Share on other sites

yep, with a bit of organisation and staying out of the pub i might put this into a tutorial and incorporate the gotcha's (like spaces)....

 

sometimes its hard to remember that this looks like greek until you understand the component parts of the statement .... read how fertalex explains it... its actually very simple when he explains the reason for the space :D

Link to comment
Share on other sites

after 12 hours on this yesterday I needed a break. Back at work today, so will be back on the case this evening!

Ok, i would probably be around so keep posting if you need some :help:

 

 

One question. When openig etc/exports, it has two lines with two different directories (share asnd shared stuff) - as I'll be renaming line 2 (to shared_stuff) should I delete line 1 here's the original output and edit line as the ls output shows, there isn't a directory called share, so I don't know why this is even listed.

 

I dont think line 1 is needed, but instead of deleting it (imaging you do and something terrible happens :o ) you can jus comment it out by insertin a # in front of the line, so will look like this:

 

#/home/username/share *

/home/username/shared stuff 192.168.0.1 (everyone)

 

Anything you put after the # character on that same line will not be taken into account, if you ever need it again, just delete the # and youre done.

sometimes its hard to remember that this looks like greek until you understand the component parts of the statement .... read how fertalex explains it... its actually very simple when he explains the reason for the space  :D

 

:lol2: :lol: Yeah, im not a native english speaker so sometimes what i say sounds funny, i try to make myself as clear as possible altough sometimes i just dont succeed. :lol2::lol2:

Link to comment
Share on other sites

Hey folks, back again

 

Well, I amended my directories (no spaces), edited etc/exports and watched my command: this is the output from client [su]

 

# mount 192.168.0.4:/shared.stuff /mnt/shared.stuff

mount: 192.168.0.4:/shared.stuff failed, reason given by server: Permission denied

 

Looked back on the server directory, and noticed that after changing the name, it reverted back to 'Not Shared' - so I reconfigured it again. In the permissions tab, out of desperation really, I checked all access permissions - still no joy.

 

Any other way of looking at why permissions are being denied? :wall:

 

It feels so close...yet so far

Edited by ChrisM
Link to comment
Share on other sites

I thought, aha, maybe it's because I've not instructed the # command, where on the server the shared.stuff directory is.

 

So I tried these 2 permatations (don't know if they are valid?)

 

# mount 192.168.0.4:/home/username/shared.stuff /mnt/shared.stuff

mount: RPC: Timed out

 

and also

 

# mount 192.168.0.4:/home/username/shared.stuff /mnt/home/shared.stuff

mount: RPC: Timed out

 

Don't know if these are useful

 

 

It's all getting very confusing from this end!!

Edited by ChrisM
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...