Re: smbfs question...

1999-04-17 Thread R. Brock Lynn
Alan Su wrote:
> 
> when i was about 8, i think i used dos.  =)  mostly just to launch
> whatever game it was that i was interested in at the time...
> 
> so, do those work?  i'm also not sure how this applies to my
> situation.  thanks.

> "R. Brock Lynn" wrote (Sat, 17 Apr 1999 12:35:29 -0500 ):
> |>
> |>ever used dos?
> |>
> C:\> move filename newfilename
> |>
> |>or
> |>
> |>C:\> ren filename newfilename
> |>
> |>(short for rename)

If for example "ren" and "move" work differently, i.e. "move" unlinks and then
relinks with a new name, but "ren" simply chnages the FAT32 filesystem
"filename" data structure field, then there is probably a way for the coders of
smbmount to exploit this feature to allow you to do what you want.

--Brock

-  PGP  43 3C 3B CB CE 4B BF D3  F4 59 BD 97 92 DB 48 9C

   __ _Debian GNU   R. Brock Lynn <[EMAIL PROTECTED]>
  / /(_)_ __  _   ___  __   www.debian.org irc.openprojects.net
 / / | | '_ \| | | \ \/ /
/ /__| | | | | |_| |>  <  World Domination, of course.
\/_|_| |_|\__,_/_/\_\


Re: smbfs question...

1999-04-17 Thread shaleh
> 
> so, now i have a question for the list.  i guess i can accept this
> behavior, but now i'm curious: what does /bin/mv do when the target
> file already exists (and isn't a directory).  it must do something
> other than unlink the target file and relink the source file to that
> name, right?  otherwise, it seems like it should work.
> 

stat("acout.57vRTc", {st_mode=0404, st_size=0, ...}) = 0
lstat("acout.3Dh0Oi", {st_mode=S_ISUID|0161, st_size=0, ...}) = 0
lstat("acout.57vRTc", {st_mode=0404, st_size=0, ...}) = 0
rename("acout.3Dh0Oi", "acout.57vRTc")  = 0

That is the end of the mv call.  Do strace -o  .  Look in file,
you will find every system call the program made.

Now if you are truly curious, you could grab the source for glibc and look at
the rename fuction and see what it does.

The stat() calls check perms and what not.


Re: smbfs question...

1999-04-17 Thread shaleh
As I told Alan in private mail, this is a Windows "feature" which prevents
users from copying over their own files.  smbfs must stick to this.


Re: smbfs question...

1999-04-17 Thread Alan Su
"R. Brock Lynn" wrote (Sat, 17 Apr 1999 12:16:27 -0500 ):
|>
|>Well here's a simple thing to check:
|>
|>Do you have write permission on the SMB share? In windows you can have two
|>passwords... one for read and one for write.
|>

Brock-

thanks for the idea.  actually, i'm quite sure i have the correct
permissions to do this, as i can manually delete the file with
/bin/rm.

Shaleh suggested to me that this is a basic limitation in windows
filesystems.  that is to say, if you go into the explorer or a command
shell on a win box and try something analogous, you get an error.

so, now i have a question for the list.  i guess i can accept this
behavior, but now i'm curious: what does /bin/mv do when the target
file already exists (and isn't a directory).  it must do something
other than unlink the target file and relink the source file to that
name, right?  otherwise, it seems like it should work.

thanks, everyone.

-alan


Re: smbfs question...

1999-04-17 Thread R. Brock Lynn
Alan Su wrote:
> 
> hi everyone-
> 
> i have a linux box and a win98 box on a network, with the windows box
> exporting a directory via SMB.  i use smbmount to mount the share,
> which works fine.  the problem arises when i try the following
> operation:
> 
>   9:27 [28] alsu (alsu):tmp/salishan99/CVS -> ls -l Entries*
>   -rwxr-xr-x   1 alsu alsu0 Apr 17 09:26 Entries*
>   -rwxr-xr-x   1 alsu alsu  308 Apr 17 09:26 Entries.Backup*
>   -rwxr-xr-x   1 alsu alsu  320 Apr 17 09:26 Entries.Log*
>   9:27 [29] alsu (alsu):tmp/salishan99/CVS -> mv -f Entries.Backup Entries
>   mv: cannot move `Entries.Backup' to `Entries': Permission denied
> 
> basically, mv doesn't want to unlink the Entries file to rename
> Entries.Backup to Entries.  this is essentially the operation that CVS
> wants to perform when updating a working directory.
> 
> has anyone encountered this problem and know of a solution?  i could
> be way off here, but it seems like a problem in the implmentation of
> smbfs.

Well here's a simple thing to check:

Do you have write permission on the SMB share? In windows you can have two
passwords... one for read and one for write.

Also note: if using 2.1 or 2.2 kernels you need to use the smbsfx package, that
includes a modified smbmount I think it's called smbmount-2.1.x or similar.

I used to mount a friend's mp3 collection directory via SMB and play MP3's on my
workstation using x11amp. :) But he would only give me his read access password
and not the write access one.

--Brock

-  PGP  43 3C 3B CB CE 4B BF D3  F4 59 BD 97 92 DB 48 9C

   __ _Debian GNU   R. Brock Lynn <[EMAIL PROTECTED]>
  / /(_)_ __  _   ___  __   www.debian.org irc.openprojects.net
 / / | | '_ \| | | \ \/ /
/ /__| | | | | |_| |>  <  World Domination, of course.
\/_|_| |_|\__,_/_/\_\  And scantily clad females.