Linux 运行create_data.sh时出现权限问题

Linux 运行create_data.sh时出现权限问题,linux,permission-denied,lmdb,voc,Linux,Permission Denied,Lmdb,Voc,my creat_data.sh: cur_dir=$(cd $( dirname ${BASH_SOURCE[0]} ) && pwd ) root_dir="$HOME/caffe" cd $root_dir redo=1 data_root_dir="$HOME" dataset_name="VOC2007" mapfile="$/home/cow/VOC2007/labelmap_voc.prototxt" anno_type="detection" db="lm

my creat_data.sh:

cur_dir=$(cd $( dirname ${BASH_SOURCE[0]} ) && pwd )
root_dir="$HOME/caffe"

cd $root_dir

redo=1
data_root_dir="$HOME"

dataset_name="VOC2007"
mapfile="$/home/cow/VOC2007/labelmap_voc.prototxt"

anno_type="detection"
db="lmdb"
min_dim=0
max_dim=0
width=0
height=0

extra_cmd="--encode-type=jpg --encoded"
if [ $redo ]
then
  extra_cmd="$extra_cmd --redo"
fi
for subset in test trainval
do
  python $root_dir/scripts/create_annoset.py --anno-type=$anno_type  --label-map-file=$mapfile --min-dim=$min_dim --max-dim=$max_dim --resize-width=$width --resize-height=$height --check-label $extra_cmd $data_root_dir 
    $HOME/VOC2007/$subset.txt
    $data_root_dir/$dataset_name/$subset"_"$db 
done
此问题适用于test.txt和trainval.txt中的每一行

“chmod-R777-2007”不起作用,我该怎么办?
谢谢,脚本使用了很多目录路径。我很确定其中一些脚本无法被执行脚本的用户访问

cur_dir=$(cd $( dirname ${BASH_SOURCE[0]} ) && pwd )
root_dir="$HOME/caffe"

cd $root_dir

redo=1
data_root_dir="$HOME"

dataset_name="VOC2007"
mapfile="$/home/cow/VOC2007/labelmap_voc.prototxt"

anno_type="detection"
db="lmdb"
min_dim=0
max_dim=0
width=0
height=0

extra_cmd="--encode-type=jpg --encoded"
if [ $redo ]
then
  extra_cmd="$extra_cmd --redo"
fi
for subset in test trainval
do
  python $root_dir/scripts/create_annoset.py --anno-type=$anno_type  --label-map-file=$mapfile --min-dim=$min_dim --max-dim=$max_dim --resize-width=$width --resize-height=$height --check-label $extra_cmd $data_root_dir 
    $HOME/VOC2007/$subset.txt
    $data_root_dir/$dataset_name/$subset"_"$db 
done