Enter into debian whose filesystem is ext4:
vim /tmp/sphinx.rst
sphinx tutorial
=====================
installation
---------------
::
sudo apt-get install python3-sphinx
create a new project
--------------------------
::
mkdir mydoc
cd mydoc
sphinx-quickstart
Display sphinx.rst
permission:
ls -al sphinx.rst
-rwxrwxrwx 1 debian debian 261 Aug 17 11:54 sphinx.rst
It can be executed when to input the absolute path /tmp/sphinx.rst
.
/tmp/sphinx.rst
/tmp/sphinx.rst: line 1: sphinx: command not found
/tmp/sphinx.rst: line 2: ====================================================================: command not found
/tmp/sphinx.rst: line 3: installation: command not found
/tmp/sphinx.rst: line 4: ---------------: command not found
/tmp/sphinx.rst: line 5: ::: command not found
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
python-babel-localedata python3-alabaster python3-babel python3-imagesize
python3-jinja2 python3-markupsafe sphinx-common
Suggested packages:
python-jinja2-doc python3-sphinx-rtd-theme dvipng sphinx-doc
The following NEW packages will be installed:
python-babel-localedata python3-alabaster python3-babel python3-imagesize
python3-jinja2 python3-markupsafe python3-sphinx sphinx-common
0 upgraded, 8 newly installed, 0 to remove and 46 not upgraded.
Need to get 4,408 kB of archives.
After this operation, 23.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Change its permission as 644
, it can be executed.
sudo chmod 644 sphinx.rst
/tmp/sphinx.rst
bash: /tmp/sphinx.rst: Permission denied
sdb2
is in ntfs
format.
sudo blkid |grep sdb2
/dev/sdb2: LABEL="winntfs" UUID="284A29774A2942C4" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="292c184b-766f-4036-8fa0-5bcd936b85c2"
Mount it with /mnt/winntfs
:
sudo mount /dev/sdb2 /mnt/winntfs
Copy /tmp/sphinx.rst
in ext4
partition into ntfs
partition.
cp /tmp/sphinx.rst /mnt/winntfs
ls -al /mnt/winntfs/sphinx.rst
-rwxrwxrwx 1 root root 261 Aug 17 12:02 /mnt/winntfs/sphinx.rst
sudo chmod 644 /mnt/winntfs/sphinx.rst
ls -al /mnt/winntfs/sphinx.rst
-rwxrwxrwx 1 root root 261 Aug 17 12:02 /mnt/winntfs/sphinx.rst
I can't revise file's mode in my debian, now reboot and enter into win10,set its permission as read and write
, containing no execute
.
Reboot and re-enter into debian, re-mount dev/sdb2
,/mnt/winntfs/sphinx.rst
still can be executed, how to set un-executable permission for the file sphinx.rst
in ntfs partition in linux?