 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

18th November 2011, 06:19 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6

|
|
Can't unRAR from one shared folder to another
Hello, this is my first post and new to Fedora 16 and Linux so I am hoping that someone will be able to help me out
I am trying to access my windows shared folders and unRAR into another shared folder.
I cannot do it using smb/computer-name/folder name as PeaZip will not let me.
So I mounted the share using:
$ mount -t cifs //computer-name/Folder-Name -o username=vivek,password=myPassword /mnt/Folder-Name/
This is so it will appear as mnt/Shared Folder Name and contain the files from the Share.
Now when I do this I do not have the ability to change any files in those folders or add files to them as I want to do.
Any help would be most appreciated and also if anyone has any tips or "simple to follow" guides to help me on my way.
Thanks a bunch.
P.S I am not sure how to make the box to show the command code like everyone else on the Forums, sorry about that.
Last edited by Shway; 18th November 2011 at 06:35 PM.
|

18th November 2011, 06:37 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 5,019

|
|
|
Re: Can't unRAR from one shared folder to another
To make the box to show code, you type a bracket [ then the word code then the other bracket ].
Type your code. Then, end it by doing bracket /code bracket, with a slash in front of the word code this time.
I'm not sure how you set up your Windows shares, but if you mount it as a user with permission to change the files in Windows it should work.
For example, assuming you log onto Windows with username vivek and password myPassword. Now, you can go into those shared folders and change files there?
Ah--I think I _might_ see the problem. Instead of mounting it on /mnt/Folder-Name, as user vivek (assuming that's also your Linux user name), make a directory in /home/vivek (on the Linux box) called say, smbmount.
Now
Code:
$ mount -t cifs //computer-name/Folder-Name -o username=vivek,password=myPassword /home/vivek/smbmount
See if you can then edit them.[
|

18th November 2011, 07:20 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141

|
|
|
Re: Can't unRAR from one shared folder to another
One way to get around the "permissions" issue when doing a cifs mount of a Windows share, instead of using a mount point in your user home directory, is to make the mount point directory itself owned by the user, and, use the uid= and gid= options to set your user id in the mount command (or fstab file). This way, you will always have full rw access.
On the F12 machine I'm typing this from, these are the mount points I have set for cifs mounts of network windows shares and ntfs-3g mounts of local hdd ntfs partitions:
Code:
BASH:~/-> ll /media/
total 32
drwxr-xr-x. 2 paulm paulm 4096 2011-01-31 17:15 alyx
drwxr-xr-x. 2 paulm paulm 4096 2011-04-25 15:52 backup
drwxr-xr-x. 2 paulm paulm 4096 2009-11-29 17:38 cortana
drwxrwxrwx. 1 paulm paulm 8192 2011-11-09 11:02 data
drwxr-xr-x. 2 paulm paulm 4096 2011-04-24 22:29 storage
drwxr-xr-x. 2 paulm paulm 4096 2009-11-29 17:38 w2k
drwxr-xr-x. 2 paulm paulm 4096 2011-04-21 13:02 w7
If you are on F15 or F16, you'd want to use /mnt instead of /media. Note that all the mount points are owned by me (paulm), not root. And a couple of my fstab entries which enable me to do quick mounts:
Code:
BASH:~/-> cat /etc/fstab | grep cifs
//cortana/MyData /media/cortana cifs uid=500,gid=500,noauto,sec=none 0 0
//alyx/Data /media/alyx cifs uid=500,gid=500,noauto,sec=none 0 0
Adjust your mount points and options as needed. With the above entries in fstab, I can just do:
Code:
sudo mount /media/alyx
..and I've got full acces to //alyx/Data on my wife's W7 laptop data partition. In order for the mount to resolve //alyx, in my /etc/hosts file is:
Code:
BASH:~/-> cat /etc/hosts | grep alyx
192.168.1.4 alyx
I have my Netgear router configured to always assign that laptop that network address.
Last edited by PabloTwo; 18th November 2011 at 07:28 PM.
|

18th November 2011, 07:30 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6

|
|
|
Re: Can't unRAR from one shared folder to another
Quote:
Originally Posted by smr54
To make the box to show code, you type a bracket [ then the word code then the other bracket ].
Type your code. Then, end it by doing bracket /code bracket, with a slash in front of the word code this time.
I'm not sure how you set up your Windows shares, but if you mount it as a user with permission to change the files in Windows it should work.
For example, assuming you log onto Windows with username vivek and password myPassword. Now, you can go into those shared folders and change files there?
Ah--I think I _might_ see the problem. Instead of mounting it on /mnt/Folder-Name, as user vivek (assuming that's also your Linux user name), make a directory in /home/vivek (on the Linux box) called say, smbmount.
Now
Code:
$ mount -t cifs //computer-name/Folder-Name -o username=vivek,password=myPassword /home/vivek/smbmount
See if you can then edit them.[
|
Thanks for telling me about the code box and for the time to help me out.
Okay I did attempt to do that, however nothing appears at all in the /home/vivek/smbmount when I try to do it again I get:
Code:
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Any thoughts?
|

18th November 2011, 07:45 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141

|
|
|
Re: Can't unRAR from one shared folder to another
The above mount command puts the options between the device to be mounted and the mount point. Wrong. Either put your options list first or last.
And you might want to use the mount.cifs command instead of mount -t cifs. Example:
Code:
mount.cifs //cortana/Data /media/cortana -o uid=500,gid=500,credentials=/home/paulm/.credentials_cortana
|

18th November 2011, 07:54 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6

|
|
|
Re: Can't unRAR from one shared folder to another
Quote:
Originally Posted by PabloTwo
The above mount command puts the options between the device to be mounted and the mount point. Wrong. Either put your options list first or last.
And you might want to use the mount.cifs command instead of mount -t cifs. Example:
Code:
mount.cifs //cortana/Data /media/cortana -o uid=500,gid=500,credentials=/home/paulm/.credentials_cortana
|
Okay, most of that is over my head. Could you elaborate a little more for me please? I am not sure where to put my information in place of yours. I apperciate your patience.
|

18th November 2011, 08:18 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141

|
|
|
Re: Can't unRAR from one shared folder to another
Use "man mount" and "man mount.cifs" in a terminal to read the man(ual) pages for each. Using mount.cifs at the command line, for example, as root:
Code:
mount.cifs //computer-name/Share-Name /mnt/Folder-Name/ -o uid=vivek,gid=vivek,user=vivek,password=myPassword
If the above doesn't give you rw permissions on the mounted network share, then chown Folder-Name to be owned by vivek:
Code:
# chown vivek:vivek /mnt/Folder-Name
If it can't find //computer-name, then substitute the actual ip_address of that computer instead of computer-name.
Once you get the command line mount.cifs working, you can then add a line to your /etc/fstab file if you wish, to simplify and speed up the mount process. The format of the fstab file is similar to, but slightly different than what you use on the command line.
|

18th November 2011, 10:29 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6

|
|
|
Re: Can't unRAR from one shared folder to another
Quote:
Originally Posted by PabloTwo
Use "man mount" and "man mount.cifs" in a terminal to read the man(ual) pages for each. Using mount.cifs at the command line, for example, as root:
Code:
mount.cifs //computer-name/Share-Name /mnt/Folder-Name/ -o uid=vivek,gid=vivek,user=vivek,password=myPassword
If the above doesn't give you rw permissions on the mounted network share, then chown Folder-Name to be owned by vivek:
Code:
# chown vivek:vivek /mnt/Folder-Name
If it can't find //computer-name, then substitute the actual ip_address of that computer instead of computer-name.
Once you get the command line mount.cifs working, you can then add a line to your /etc/fstab file if you wish, to simplify and speed up the mount process. The format of the fstab file is similar to, but slightly different than what you use on the command line.
|
Okay, I used
Code:
# chown vivek:vivek /mnt/Folder-Name
However I get
Code:
# chown: changing ownership of `/mnt/SVR-Freshstack/': Permission denied
I made sure I was the root by using Was there something I missed or need to do something else?
Last edited by Shway; 18th November 2011 at 10:32 PM.
|

18th November 2011, 11:20 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141

|
|
|
Re: Can't unRAR from one shared folder to another
Switch to root using "su -" instead of just "su". That's su followed by a space then a hyphen. Then try the chown command again. Should work this time.
|

19th November 2011, 06:27 AM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6

|
|
|
Re: Can't unRAR from one shared folder to another
Okay, back again. Two things to report, however I feel like I am close.
First up, I used the command
Code:
su -chown vivek:vivek /mnt/Fresh
However I got
Code:
su: user vivek:vivek does not exist
Is there a user name that is special?
NOW
2nd, is there a way I can have these mounts come up each boot, as I am having to mount them everytime after I restart.
Thank you in advance!
Last edited by Shway; 19th November 2011 at 06:49 AM.
|

19th November 2011, 07:04 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141

|
|
|
Re: Can't unRAR from one shared folder to another
You first change to root using the "su -" command, then use the chown command. I am assuming your regular user name is vivek. If it is not, then use the correct name, or id number. The "id" command, while you are regular user before switching to the root user, will show you your $USER name and user id number, among other things.
Code:
su -
enter roots password
chown vivek:vivek /mnt/Fresh
Assuming vivek is your regular user name and /mnt/Fresh is the directory you have created and want to do a cifs windows share mount to.
You can have these mounts come up automatically at boot up. That's where the /etc/fstab file comes in.
Are you still getting write permissions problems after you do a manual mount? That's the whole reason for making vivek the owner of the directory where the mount takes place.
|

20th November 2011, 07:20 AM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6

|
|
|
Re: Can't unRAR from one shared folder to another
So I tried a few things Heres what I got.
Code:
# su - vivek chown /mnt/Fresh
/bin/chown: /bin/chown: cannot execute binary file
I was reading through the --help and saw some info and tried
Code:
# su - vivek chown root /mnt/Fresh
/bin/chown: /bin/chown: cannot execute binary file
What do you think?
Thanks to all!!
Last edited by Shway; 20th November 2011 at 07:21 AM.
Reason: Grammer, Spelling etc.
|

20th November 2011, 12:11 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 5,019

|
|
|
Re: Can't unRAR from one shared folder to another
Is anything mounted on Fresh right now? As I mentioned before, I prefer to mount these things in my home directory, which sometimes helps.
If you're typing exactly what you've posted, you're trying to do this as user vivek, not as root.
Have you done
su -
<then, when prompted, put in root's password>
Right now it looks as if you're trying to, as user vivek, change something's ownership to root.
Anyway, you haven't typed what Pablo suggested. Type that and see what happens. Exactly as he typed it, that's why he put it in neat code blocks for you.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 00:52 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|