Samba giving "Function not implemented" error - linux

Been using samba on my Linux Mint machine to map to a windows network drive of a large university for a couple of years. Has always worked.
Linux Mint version: 18 (Sarah)
Kernel: 4.4.0-164-generic
Samba version: Version 4.3.11-Ubuntu
I use their VPN and then map to the samba with:
smb://DOMAIN;user#subdomain.address.edu/ssd_drives_k/my/path/to/files
This has worked for ages; but recently the problem has arisen that I can only read (and therefore open/copy) some files but not others. I can see everything in nemo but some files (of all types, word, pdf, etc) WILL NOT copy to my computer or open in their respective program. There doesn't seem to be any particular pattern as to which files it affects but basically some are visible but inaccessible to me.
The error I get on those files is "Function not implemented", for example:
When trying to copy some files to my desktop gives "Function not implemented" error window (i.e. "Error while copying FILE/PATH"; There was an error while copying the file into /path/path"; and then Cancel or Skip options - "Show more details" says "Function not implemented").
When trying to open some pdfs gives "Function not implemented" in my pdf reader (that is the default system reader; if I try okular it simply doesnt open and no error).
Error screenshot:
Hence, there's a bunch of stuff I can no longer access... The IT team at the university are normally really great but in this instance have just left me hanging with nothing... frustrating but I wondered if anyone here might be able to help answer what is causing this and how to correct it?

Thanks to this answer I have deduced a solution: https://serverfault.com/questions/414074/mount-cifs-host-is-down/929331#929331
Not sure why but I suspect an upgrade in my computer of SMB has meant I am no longer compatible with their (older?) version.
This now works if I do it manually in the terminal and specify vers = 1.0:
sudo mount -t cifs //subdomain.address.edu/ssd_drives_k/my/path/to/files /mnt/driveiwant -o username=user,domain=DOMAIN,vers=1.0
But vers=3.0 doesn't work:
sudo mount -t cifs //subdomain.address.edu/ssd_drives_k/my/path/to/files /mnt/driveiwant -o username=user,domain=DOMAIN,vers=3.0
So it seems they need to upgrade their gear maybe, I am not sure, but this works!

Related

WSL2 "read-only" file system while building chromium

I'm attempting to build chromium on WSL2 according to this guide.
When I get to the fetch --nohooks chromium everything is loading and then I get the following error:
OSError: [Errno 30] Read-only file system: '/home/ghadar/chromium/src/third_party/libprotobuf-mutator/_gclient_src_0ve3yqhz'
I've looked everywhere and couldn't find any explanation to this error.
I'm running WSL2 on Windows 11 with Ubuntu 20.04 as the Linux distribution.
A few possibilities that I can think of:
Filesystem corruption (it happens)
Out of disk space on the host Windows drive
For the first one, see #6220 on the WSL Github. Recommended solution is (and it might be a good idea to backup any critical files first):
# Identify the correct drive:
mount | grep ext4
# Take the drive returned (e.g. /dev/sdd) and:
sudo e2fsck /dev/sdd -p
It could also be a disk-space issue. The Chromium source is pretty large at around 57GB. Is it possible that you are out of disk space on the Windows drive? If so, then WSL still thinks it has space remaining, because it is on a sparse virtual disk that can grow up to (250GB/1TB depending on the WSL release), but once space on the host drive is gone, WSL probably set the device read-only.
If that's the case, and you have a larger drive (SSD/NVMe recommended for performance, of course), you can "move" the virtual disk if you'd like -- See my Super User answer on the topic.
Or you might try fetching without the full repo history, as suggested in the docs, with the --no-history flag.

Changing path to WSL remote

I have an issue with VS Code and WSL remote extension. On my machine, Windows Defender Firewall blocked node. I do not have sufficient rights to unblock it, but admins created excluded folder, where based on what they said "I can copy everything that I will need and it is excluded from Windows Defender Firewall check". So I copied VS Code there but I need to also copy the package with Debian Linux there and link it to the new path.
But I was not able to find where this path to Debian is stored, and how it can be changed. For me, the folder is now in
C:\Users\{username}\AppData\Local\Packages\TheDebianProject.DebianGNULinux_... and need to be moved to C:\ExcludedFolder
Is this possible? Thank you very much for your response.
First up, you might be able to solve your firewall problem a slightly different way. I can't say for certain (and things are always changing), but it's been my experience that Firewall/Defender only detect and block for WSL1 applications. This is at least true for the malware/antivirus detection, but I believe it would extend to the firewall functionality as well. On the other hand, if it doesn't, then moving the instance to a different directory may not help with your issue.
You can double-check the version of your Debian instance using wsl -l -v. If it's version 1, then let's try converting it to 2 (if you have that permission on your system).
The first steps here are going to be the same regardless of whether you just convert the instance or move it:
First, exit your WSL/Debian instance and then issue wsl --shutdown. You can do this from PowerShell, CMD, or the Start Menu; but I'm going to assume for the rest of the instructions that you are in PowerShell.
Run the following in PowerShell:
cd <your exclusion directory>
mkdir wsl\images
cd wsl\images
wsl --export Debian 2021-11-02_Debian_backup.tar
Assuming that your instance is WSL1 and you want to try to convert to WSL2, you at least now have a backup. Run wsl --set-version Debian 2 to convert it to WSL2. Then start it up and see if there are any differences in how node behaves. You can always convert it back with wsl --set-version Debian 1, of course.
If you still need to try moving it:
cd <your exclusion directory>\wsl
mkdir instances\debian_exclude
wsl --import debian_exclude instances\debian_exclude images\2021-11-02_Debian_backup.tar --version 2
wsl -d debian_exclude
Note that you can, of course, call the filenames and directories whatever you want. Also note that you can change the version number when you import it. Select whichever WSL version you need there.
You should now be in a new instance of Debian, but you'll be running as root by default. You need to set the default user of the imported instance by creating /etc/wsl.conf with the following:
[user]
default=<your_wsl_username>
Exit the instance, run another wsl --shutdown, and restart. You should now be running as your normal user. Try node again there to see if new location allows it to be excluded from the firewall rules.
If everything is working as intended, you can wsl --unregister Debian to remove the old instance. Please note that this will remove all files in the instance, so please make sure that your backup and new instance have everything you need first.
Unregistering the old instance should set the new one as your default, but if not, you can use wsl --set-default debian_exclude.

windows subsystem Linux cannot find files in the terminal

When using window 10 system.
I have assessed the home directory of the WSL and manually move a python file into the following address
C:\Users\assa8\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\lxr\demo
However, the python file did not show up when I use the 'ls' command in the Linux terminal and I also could not run it using command lines. It appears the file did not exist when I tried to access it through the terminal.
How can I fix it?
Thanks
If you are using WSL1 then the recommendations are to not under any situations edit or modify any Linux files inside of your %LOCALAPPDATA% folder using Windows apps or tools which includes moving files using file explorer. See this blog post from Microsoft https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/
If you are Using WSL2 that is a slightly different issue of which i cant help you right now as i am still using WSL1
You should do your dev work in the /mnt/c/ sub folders in WSL which will allow you to easily edit those same files on windows. Personally I work in a folder c:\projects\ which is mapped to /mnt/c/projects/ in WSL.

Installing perforce visual client on linux

I am from Mac background trying my hand at installing perforce client visual(P4V) on my linux box.For this I download the correct version here and untar the files.
Then I cd to the directory
~/Desktop/p4v-2012-blah-blah/bin
I also say
chmod +x p4*
After this i try running p4v (by double clicking) but I dont see anything .The file type is shown as a "text executable" but i dont know why it is not running.
On mac i had done the same thing -just clicked on p4v and the client would show up(where I filled the server address and everything )But not sure what is going wrong here.Can someone give me directions?
FWIW i did check out this link
and I do see the desktop (so GNOME is probably installed ?) .Hence p4v should be able to run.
I know we don't like link-based answers, but there is a rather complete walk-through here: http://www.perforce.com/documentation/tenminute-test-drive-linuxunix
Probably should be on Super User though.
You may have a 64bit Linux and tried to install a x86 P4V or vice versa, which is why the command doesn't run. Check that the OS and app types match.

How to set up MIT Scheme for 6.001 in Ubuntu 8.10

I play to self-study 6.001 with the video lectures and lecture handouts. However, I have some problems setting up MIT Scheme in Ubuntu (intrepid).
I used package management and installed MIT-Scheme, but it's obviously the wrong version to use. It should be 7.5.1 instead of 7.7.90
I followed the instructions from this website (http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/Tools/detail/linuxinstall.htm)
So far, I've downloaded the tar file, and extracted to /usr/local. I have no idea what step 3 means.
Then I entered command
scheme -large -band 6001.com -edit
and the error is
Not enough memory for this configuration.
I tried to run under sudo mode, and this time the error is different
Unable to allocate process table.
Inconsistency detected
I have close to 1GB of free memory, with ample HDD space. What should I do to successfully set this up?
Step 3 means that you should type export MITSCHEME_6001_DIRECTORY=${your_problems_path}. If you don't want to type it every time you launch Scheme, you should put it as a string in your ~/.bash_profile file(in case you use bash)
About the problem itself, Google instantly suggests a solution:
sudo sysctl -w vm.mmap_min_addr=0(taken from http://ubuntuforums.org/showthread.php?p=4868292)
Instead of the package manager, you may also want to compile the portable C sources for Unix. I am using it happily.

Resources