相关疑难解决方法(0)

无法打开文件'svn/repo/db/txn-current-lock':权限被拒绝

我已经设置了一个Linux服务器,并在其上安装了Apache,SVN和dav_svn.现在,当我尝试https://x.x.x.x:x/svn/repo使用Tortoise SVN 上传时,我得到了

Can't open file '/server/svn/repo/db/txn-current-lock': Permission denied
Run Code Online (Sandbox Code Playgroud)

我已正确设置我的SSL(我可以结帐,没有问题,甚至由于端口转发而远程).

我猜这与存储库文件夹的Linux所有权有关,我该如何设置这个/什么是命令?

svn apache

50
推荐指数
2
解决办法
11万
查看次数

使用AJAX部署Flask应用程序文件上载权限被拒绝

我的文件上传在内置的Flask服务器上完美运行,但是当我部署它时,文件上传中断了(Apache2).

Flask python代码:

@app.route('/uploadajax', methods=['POST', 'GET'])
def upload():
    file = request.files['file']

    if file and allowed_file(file.filename):
        filename = secure_filename(file.filename)
        file.save('TEST.pdf')

    return jsonify({'filename':'http://www.michigan.gov/documents/sprsConnectionsVol5No1_15852_7.pdf'})
Run Code Online (Sandbox Code Playgroud)

使用Javascript:

$(function() {
    $('#upload-file-btn').click(function() {
        var form_data = new FormData($('#upload-file')[0])
        $.ajax({
            type: 'POST',
            url: SCRIPT_ROOT + '/uploadajax',
            data: form_data,
            contentType: false,
            cache: false,
            processData: false,
            async: false,
            success: function(data) {
                console.log('Loaded questions successfully.')
                packet_frame = '<iframe src="http://docs.google.com/viewer?url=' + encodeURI(data['filename']) + '&embedded=true" width="100%" height="260" style="border: none;"></iframe>'
            }
        })
    })
})
Run Code Online (Sandbox Code Playgroud)

如果我注释掉file.save('...')行,则没有错误.具体错误是

[Sat Nov 30 20:43:21 2013] [error] [client 66.75.0.4]     file.save('TEST.pdf'), …
Run Code Online (Sandbox Code Playgroud)

python ajax flask

1
推荐指数
1
解决办法
3597
查看次数

标签 统计

ajax ×1

apache ×1

flask ×1

python ×1

svn ×1