精华内容
下载资源
问答
  • 女孩子两岁多了,喜欢照相,又不想给看手机,准备将raspberry配置为共享站点,这样拍的照片、视频等可以共享树莓派。最终实现可以通过Windows和安卓平台上传文件。 作者还拥有个人公众号,会写一些感悟文章,知圈...

    背景

    家里有一台rasperberry供女儿玩。女孩子两岁多了,喜欢照相,又不想给看手机,准备将raspberry配置为共享站点,这样拍的照片、视频等可以共享到树莓派。最终实现可以通过Windows和安卓平台上传文件。

    作者还拥有个人公众号,会写一些感悟文章,知圈,二维码如下,欢迎扫描关注,关注后有作者微信,欢迎添加交流:
    知圈二维码
    作者之前的raspberry配置参见该篇文章

    安装samba

    第一步,先更新package list。

    sudo apt-get update
    sudo apt-get upgrade
    

    然后,安装samba

    sudo apt-get install samba samba-common-bin
    

    安装时会提示更改一些信息,直接选“Y”。

    配置samba

    安装完成后新建共享文件夹:

    mkdir /home/pi/Destop/Media
    

    我个人为了方便在Media下又建了三个子文件夹。
    建完文件夹后配置smb.conf配置文件。

    sudo nano /etc/samba/smb.conf
    

    在配置文件的最后,添加如下:

    [pimylifeupshare]
    path = /home/pi/Desktop/Media
    writeable=Yes
    create mask=0777
    directory mask=0777
    public=no
    
    

    其中各意思如下:

    • “[pimylifeupshare]” – This defines the share itself, the text between the brackets is the point at which you will access the share. For example, ours will be at the following address: //raspberrypi/pimylifeupshare

    • “path” – This option is the path to the directory on your Raspberry Pi that you want to be shared.

    • “writeable” – When this option is set to “Yes“, it will allow the folder to be writable.

    • “create mask” and “directory mask” – This option defines the maximum permissions for both files and folders. Setting this to 0777 allows users to read, write, and execute.

    • “public” – If this is set to “no” the Pi will require a valid user to grant access to the shared folders.

    建立访问用户名和密码:

    sudo smbpasswd -a pi
    

    紧跟着会要求输入用户名。在此将用户名设为pi,密码raspberry。
    重启samba服务使配置生效:

    sudo systemctl restart smbd
    

    在这里插入图片描述

    从Windows端访问

    打开Windows10的"计算机"文件管理器,按以下路径找到map network drive,点击
    在这里插入图片描述

    在这里插入图片描述

    在这里插入图片描述
    在这里插入图片描述
    经过莫名其妙的各种验证后,竟然可以访问所有的文件夹。。。而不是仅仅我的Media。。。
    在这里插入图片描述
    虽然有些危险,但是目的确实达到了。window可以访问。但是发现没有权限放东西。后来发现samba是有自己的文件夹,就是下面这个,自己建的不行。
    在这里插入图片描述
    这个文件夹点击进去就是桌面共享的文件夹。

    安卓共享

    去官网下载andsmb下载最新版本安装。
    安装完后打开,点击➕号:
    在这里插入图片描述
    配置:
    在这里插入图片描述
    保存后就可以了。
    选中图片,选择分享,然后选中andsmb就可以了,直接上传至共享文件夹。
    在这里插入图片描述
    也可以打开andsmb,然后在里面点击手机图标来上传文件。

    展开全文
  • 创建共享文件夹 mkdir /home/pi/share sudo chmod 777 /home/pi/share 编辑smb.conf,在最后添加下面的配置 sudo vim /etc/samba/smb.conf [share] path = /home/pi/share valid users = pi browseab

    树莓派samba配置1

    安装

    sudo apt-get update
    sudo apt-get install samba samba-common-bin
    

    创建共享文件夹

    mkdir /home/pi/share
    sudo chmod 777 /home/pi/share
    

    编辑smb.conf,在最后添加下面的配置

    sudo vim /etc/samba/smb.conf
    
    [share]
       path = /home/pi/share
       valid users = pi
       browseable = yes
       public = yes
       writable = yes
       guest ok = yes
       read only = no
    

    重启服务2

    sudo service smbd restart
    

    配置密码

    sudo smbpasswd -a pi
    

    ubuntu18.04 桌面版配置

    参考:ubuntu18.04局域网共享文件


    1. https://blog.csdn.net/byforson/article/details/90900640 ↩︎

    2. https://blog.csdn.net/junglezax/article/details/11688911 ↩︎

    展开全文
  • 转载自:http://raspberrypihq.com/how-to-share-a-folder-with-a-windows-computer-from-a-raspberry-pi/ Sharing files over the network is often very useful. Whether you need to transfer media files to ...

    转载自:http://raspberrypihq.com/how-to-share-a-folder-with-a-windows-computer-from-a-raspberry-pi/

     

    Sharing files over the network is often very useful. Whether you need to transfer media files to the Raspberry Pi or you want to use the raspberry as a simple Network-Attached Storage (NAS) device, this guide will show you how to enable file sharing of a folder on the Raspberry Pi running the Raspbian OS.

     

    Prerequisites & Equipment

    You are going to need the following:

    • A Raspberry Pi (Buy here)
    • A SD Card flashed with the Raspbian OS (Here is a guide if you need)
    • Access to the Raspberry either via keyboard and a monitor or remotely
    • A home network
    • A Windows computer (for this guide we will be running Windows 7)

    Install and configure required software

    To share network folders to a Windows computer we need to install some special software on the Raspberry Pi. The software providing the secret sauce this time is called Samba. The Samba software package implements the SMB protocol and provides support for the Windows naming service (WINS) and for joining a Windows Workgroup.

    Installing the software is easy – login to your Raspberry Pi and run:

    sudo apt-get install samba samba-common-bin

    After installation configure the software by opening the file /etc/samba/smb.conf using the command:

    sudo nano /etc/samba/smb.conf

    Read through the file and make sure you have the following parameters set:

    workgroup = WORKGROUP
    wins support = yes

    You can use anything as your workgroup name as long as it is alphanumerical and matches the workgroup you would like to join. The default workgroup in Windows 7 is WORKGROUP.

    Setup folder to share

    Next step is to create the folder you would like to share. To create a folder called “share” in your home directory do the following:

    mkdir ~/share

    With the folder created we can now tell the Samba software to share it on the network. Open the file /etc/samba/smb.conf using the command:

    sudo nano /etc/samba/smb.conf

    Scroll to the bottom and add the following:

    [PiShare]
     comment=Raspberry Pi Share
     path=/home/pi/share
     browseable=Yes
     writeable=Yes
     only guest=no
     create mask=0777
     directory mask=0777
     public=no

    Notice how we tell Samba that public access is not allowed via “public=no” – this means that anyone wanting to access the shared folder must login with a valid user.

    In this case the valid user is the user called “pi”. To let Samba know that “pi” is a network user run the command:

    sudo smbpasswd -a pi

    And enter pi’s password twice (default: raspberry).

    At this point we can now login to the share from our Windows computer – use Domain: raspberrypi, User: pi and Password: raspberry (unless you changed the password) as you can see below:

    Login to shared folder on Raspberry Pi

    If you do not want to deal with logging in you can always make the share publicly available by changing the config file to say:

    public=yes

    However please note that this is extremely dangerous since anyone will be able to access, modify and delete your files.

    转载于:https://www.cnblogs.com/itlqs/p/6812453.html

    展开全文
  • 1.挂载硬盘 首先需要准备一块硬盘,一个USB-SATA线,以及电源。 插上硬盘,sudo fdisk -l 查看硬盘挂在的盘符比如:/dev/sda1 创建挂在目录:sudo mkdir /mnt/hdd 开机自动挂载:sudo vim /etc/fstab ...

    1.挂载硬盘

    首先需要准备一块硬盘,一个USB-SATA线,以及电源。
    插上硬盘,sudo fdisk -l
    查看硬盘挂在的盘符比如:/dev/sda1
    创建挂在目录:sudo mkdir /mnt/hdd
    开机自动挂载:sudo vim /etc/fstab
    在最后加上:/dev/sda1 /mnt/hdd auto defaults 0 0

    2.安装samba服务

    安装:sudo apt-get install samba
    配置:sudo vim /etc/samba/smb.conf
    在最后加上:
    [my share]
    comment=my share directory path
    path =/mnt/hdd
    browseable=yes
    writeable=yes
    guest ok=yes
    保存,退出
    添加用户:
    sudo smbpasswd -a username
    这里username换成要添加的用户名
    然后输入两边密码
    如果出现如下:
    Failed to add entry for user username
    问题是因为没有加相应的系统账号,所以会提示Failed to add entry for user的错误,只需增加相应的系统账号usernamet就可以了:
    [root@ubuntu ~]# groupadd username -g 6000
    [root@ubuntu ~]# useradd username -u 6000 -g 6000 -s /sbin/nologin -d /dev/null
    继续sudo smbpasswd -a username
    配置完成
    重启ubuntu
    在windows端,一是可以通过网上邻居找到目标计算机(ubunu)
    还可以输入\\ip\进行访问:
    在这里插入图片描述

    展开全文
  • 比如,局域网内登录树莓派,开机 VNC、使用共享文件夹的操作。所以以防以后忘记,就把相关操作的流程稍微记录一下,以后可以回来在复习一遍。 注意!以下的操作,仅仅适用于已经全部安装好相关服务,但是忘记操作的...
  • sudo apt-get install samba samba-common-bin sudo apt-get install netatalk (可选,用于支持AFP) sudo apt-get install avahi-daemon(可选,用于支持网内的计算机自动发现) sudo su vi/etc/samba/smb.conf ...
  • 先实现共享文件夹,再实现开机自动挂载共享 1、实现共享文件夹: 首先对Windows端操作,共享出一个文件夹: 我共享了我的Download文件夹(右键->共享),然后在里面新建了Share目录 WIndows操作结束 ...
  • 创建一个目录,此目录作为之后window的共享文件夹 mkdir /home/pi/share sudo chmod 777 /home/pi/share 1.2.2 修改samba配置文件 sudo vim /etc/samba/smb.conf (在smb.conf文件最后加上以下内容) [share] ...
  • fdisk -l apt-get install ntfs-3g mkdir -p /share/disk1 chown pi.pi /share/disk1 mount -t auto /dev/sda1 /share/disk1 echo "/dev/sda1 /share/disk1 ntfs defaults 0 0">>/etc/fstab ...
  •  mount -t cifs -o codepage=cp936 //ip地址或计算机名/共享文件夹名 挂载点 sudo mount -t cifs -o username=administrator,password=xxx // 192.168.1.100/gongxiang /mnt/samba 注:administrator ...
  • 树莓派和局域网中的电脑文件共享 ...3.配置共享文件夹 [public] comment = public storage path = /home/public/wenjian valid users = pi read only = no create mask = 0777 directory mask = 0777 gu
  • 1.虚拟机设置共享文件夹: 之后打开终端: ls /mnt/hgfs/ 可看到share文件 即为成功 存在问题:ls /mnt/hgfs/下没有share文件 cd mnt //显示没有该文件或者目录 //应该输入 cd /mnt/hgfs 如果还没有,直接创建 ...
  • linux下操作:系统为基于debian的Raspberry树莓派 1. 安装nfs服务     sudo apt-get ...2. 配置 /etc/exports   /home/pi/Zhang *(rw,sync,no_root_squash)   Zhang为我的共享文件夹。 3. 重新加载/etc/ex...
  • 看了书和网上的基于samba的私有云建立的教程,都由于时间过去了很久不能够使用,这里结合了几篇教程,成功设置了基于samba的树莓派共享文件夹的设计。1.进行软件的更新sudo apt-get update sudo apt-get upgrade2....
  • win10电脑不能访问树莓派的samba共享文件夹怎么办,本经验教你解决这个问题。windows10默认不开启samba服务,那我就来教你怎么开启samba服务。 1.步骤一 因为windows10默认不开启samba服务,所以使用samba共享...

空空如也

空空如也

1 2 3 4 5 6
收藏数 105
精华内容 42
关键字:

树莓派共享文件夹