Samba Share directory outside user directory - networking

I set up a machine with Ubuntu 14.4.1 yesterday and I am trying to use it as remote storage for a project I am working on remotely with a few people. I know nothing about hosting servers, so I am attempting to avoid the issue entirely by just treating it like a local area network using Hamachi.
The Ubuntu machine has 2 hard drives - a boot drive on which Linux is installed and a larger data drive. I am attempting to share a directory on the data drive via samba so that it can be accessed via Hamachi by windows 7 machines.
I am able to see the directories that I have shared, but when I try to enter them, I get a permission denied error. When I share a directory within my /home/user/ directory, it works fine. Is there any way that I can share a directory on my data drive?
Perhaps I could make a symbolic link from my user directory to the data drive? Would that actually work? I am not familiar.

If it is NTFS, you can't change the permissions, which will be the issue.

Related

Run a program off a Network Share

I am trying to make a shortcut of some sort, hopefully a .desktop file, to run a jar file from a network share. I want to be able to do this without mounting the drive is possible. I've looked a few other posts on this site, and most talk about using Nautilus or some fileshare program to open a path to the file, but I want to be able to run the file from the network drive. Any help is appreciated.
I've been working on an alternative with a drive that mounts on login. The current setup I'm trying is to get a script to run at login using environmental variables. I've tried a number of the CIFS options, but nothing seems to work without prompting for the user's password.
My fstab file has the following:
//share.domain.com/folder /mnt/folder cifs noauto,users 0 0
I have a small shell script to mount it.
mount /mnt/folder
Is there any way to get the drive to mount without the user typing in their password? Note: this should work for multiple users on the system. So a credentials file isn't optimal.

Creat .BAT to copy a .mdb from network drive to local C:/

I hope I can get some help with this from someone here on this awesome website.
Im a complete noob when it comes to writing batch scripts and I would really like some help.
My situation..
I currently have a network drive on a PC running Windows Server 2008. The drive letter is I:/
within the I-drive, I have a folder named aaaaeast and within that folder is all of my .mdb's
I would like the .bat to copy a specific .mdb from I:/aaaaeast/ to a XP SP3 machine I have in the other room on startup.
Ive tried
copy \myserver\myshare\myfolder\myfile.txt c:\myfiles
But it fails to find the network path.
I know this is got to be a permission issue. My network doesnt have a domain and all the PC's I map to the I:/ map through the Guest account on the Win 2008 server using (username: Guest with no password)
Can someone please help or point me in the right direction.
Ok, this works for me where I work. There is a mapped drive to the location where the master .mdb is.
That is "i:\" drive.
copy i:\ets\lead\software\paint\leadmain.mdb c:\paint
it copies the .mdb to the "c:\paint" drive on the computer where the client clicked on the .bat file. It has been a while so I can't remember where the .bat file sits. Pretty sure it is on the client's computer.
Open Notepad, add the code above, and save making sure to pick the option "All files" down below. That way you can change the extension to .bat from .txt.
copy \\myserver\myshare\myfolder\myfile.txt c:\myfiles
Note: double-backslash
A UNC path (path to a network resource) requires that the target computer name be preceded by two backslashes. Otherwise, starting with \ means "start at the root of the current drive". (Perhaps this was just a typo in the post—that wouldn't cause an error 53.)
Regarding accounts, Windows doesn't really like no-password accounts. There are times when it won't let authentication succeed for a null password. You might try creating an account (with the same name as the username/password on the XP machine) on the 2008 machine and trying it just to see if the user has access to the share. A simple test of that would be something like "dir \myserver\myshare".
If you didn't want to sync accounts, you could create a third user on the 2008 machine and map the share (from the XP machine) as that user. You can also tell Windows to remember the credentials it used for that mapping if you wanted to (i.e. for convenience, definitely not security).

How do I log on to my school network from my internet network at my house?

Is there a way I can access network drives on the school network from my home.
You can create a VPN, and then use Windows Remote Desktop to log on. Or, another simple solution, install Dropbox, and there's an addon for it to automatically run scripts that you put in a directory, and your scripts can copy that resource into the dropbox folder, which is automatically sycned with your account.

Cannot execute System.IO.File.Move to a network drive from SharePoint Server 2007 (MOSS)

I am using VS2008 C# and MOSS (SharePoint Server 2007).
I have created an asp.net web form which appears on a WebPart within a SharePoint site. When submitting the form, a small .csv file is generated. Ideally I want to have this file created on a network drive (on another server), but for some reason I cannot do this. I can create the file happily on the hard drive of my SharePoint server itself that I am working on, but it just never appears on any network drive that I choose.
I then thought I'd create the file on my c: drive first (as it works), then use asp.net to 'Move' the file to the network directory. I used:
System.IO.File.Move(sourceFile, destinationFile);
This failed also at the 'moving' stage. - the file gets created fine! On the MOSS server I am working on, there is a C: drive and a D: drive (partitioned). The file creation works fine on both drives, but just not any network drive even if I avoid using drive mappings as below:
(e.g. "G:\\Group Files\\" or "\\\\Global\\Group Files\\" )
Obviously, I thought security was an issue, so I ensured the MOSS server and the network server both allowed each other with 'Full Access' using Active Directory. I even granted access to myself as a user, admin groups, the ASPNET account, NETWORK SERVICE account (amongst others), etc with MODIFY access. Still no joy. I can PING the network server that I want to create the .csv file on, so it is 'seeing' it.
The work-around that I have done is create the file on the SharePoint server's c: drive, then run a batch file (on schedule) that purely copies the file to the destination G: drive - this works a treat, but I am frustrated that I cannot create the file on the destination server straight away, using code.
I've got a hunch it is SharePoint related, but if anyone can shed light on this matter I'd be extremely grateful!!
Thanks in advance, Ash ;-)
Ah, I had this problem today and found this thread whilst looking for an answer. My problem was that my temp directory didn't have the right permissions! Sure, I could get the file uploaded without issue, but I couldn't move it unless I were using a LAN account. I made sure NETWORK SERVICE and my sharepoint application pool had access, and made sure the user who was uploading the file had permission too. Then it worked.

Remote File Read

How can I read a text file resides in a remote machine? There is no share exists in that machine and I am not allowed to create any share or file in the remote machine. Also I am not allowed to run any client program in the remote machine. My program is a ASP.net in C# residing in a IIS webserver. For linux machine we used ssh connections and file reads are easy. Is there something by default available in windows similiar to it ?
Thanks,
Sreejith
The first question to ask is if there's a good business reason to read that file. If yes, the IT people will have to allow you a reasonable solution to the problem.
I have frequently used SFTP (secure FTP) for this kind of problem. Unfortunately SFTP is not part of Windows, but there are free and low-cost SFTP servers available. Here's a list from Wikipedia
Explain to IT why you need access to that file and discuss options including SFTP. If you have a valid business reason for this and they will "not let you because of policy", it's the job of your project manager or boss to clear out that roadblock. Ask them to help.
Finally, consider whether it's practical for the file on the remote machine to be pushed to you instead of you pulling it. If you can setup a file share on your PC, ask them to setup a job on the remote server that copies the file to your file share every time it is changed.
You could try accessing the Admin share of the machine. Windows by default created a share for all disks (named C$, D$ etc). But in that case the application you write should be running with the credentials of a user with rights to that share ((local) administrators have sufficient rights to do that).
If that doesn't work you need to create a share or install software to get files from that machine (like FTP). This is all because of security, it's a good thing you are not able to just read a file from any machine...
I have done this many time with the Remote File port 34
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Resources